Macro dtab::dentry
[−]
[src]
macro_rules! dentry { ($src: expr => $dst: expr ) => { ... }; }
Macro for constructing a [Dentry].
This allows us to make [Dentry]s somewhat more ergonomically
than using the >> operator (since it doesn't require
the use of grouping symbols for the destination side of the
Dentry when using the [NameTree] DSL).
The macro also allows the use of => rather than >>, as to
more closely match the dtab synbtax.
Examples
use dtab::NameTree; let dentry = dentry!( "/iceCreamStore" => NameTree::from("/smitten") | "/humphrys" | "/birite" | "/three-twins" ); assert_eq!( "/iceCreamStore => /smitten | /humphrys | /birite | /three-twins;" , &dentry.to_string() );