Enum mtree::MTreeLine [−][src]
pub enum MTreeLine<'a> { Blank, Comment(&'a [u8]), Special(SpecialKind, Vec<Keyword<'a>>), Relative(&'a [u8], Vec<Keyword<'a>>), DotDot, Full(&'a [u8], Vec<Keyword<'a>>), }
An mtree file is a sequence of lines, each a semantic unit.
Variants
Blank
Blank lines are ignored.
Comment(&'a [u8])
Lines starting with a '#' are ignored.
Special(SpecialKind, Vec<Keyword<'a>>)
Special commands (starting with '/') alter the behavior of later entries.
Relative(&'a [u8], Vec<Keyword<'a>>)
If the first word does not contain a '/', it is a file in the current directory.
DotDot
Change the current directory to the parent of the current directory.
Full(&'a [u8], Vec<Keyword<'a>>)
If the first word does contain a '/', it is a file relative to the starting (not current) directory.
Methods
impl<'a> MTreeLine<'a>
[src]
impl<'a> MTreeLine<'a>
pub fn from_bytes(input: &'a [u8]) -> Result<MTreeLine<'a>, ParserError>
[src]
pub fn from_bytes(input: &'a [u8]) -> Result<MTreeLine<'a>, ParserError>