pub enum Item<'a> {
Comm(&'a str),
Str(&'a str),
Sym(&'a str),
Punct(&'a str),
Tuple(Seq<'a>),
List(Seq<'a>),
Block(Seq<'a>),
Prefixed {
sigil: char,
item: Box<Item<'a>>,
},
}Expand description
A single visually-atomic entity in a chain (<item> in the spec).
Variants§
Comm(&'a str)
A comment, stored raw including its // or /* */ delimiters.
Str(&'a str)
A string literal; the inner slice, between the quotes, undecoded
(escapes are validated but not expanded — see the crate open note).
Sym(&'a str)
A symbol: a maximal run of symchars (identifier, number, operator, …).
Punct(&'a str)
Punctuation: a maximal run of punctchars standing between items (:).
Tuple(Seq<'a>)
A parenthesis-wrapped sequence.
List(Seq<'a>)
A bracket-wrapped sequence.
Block(Seq<'a>)
A brace-wrapped sequence.
Prefixed
An item marked with a leading sigil (& is the only one so far).
Trait Implementations§
impl<'a> Eq for Item<'a>
impl<'a> StructuralPartialEq for Item<'a>
Auto Trait Implementations§
impl<'a> Freeze for Item<'a>
impl<'a> RefUnwindSafe for Item<'a>
impl<'a> Send for Item<'a>
impl<'a> Sync for Item<'a>
impl<'a> Unpin for Item<'a>
impl<'a> UnsafeUnpin for Item<'a>
impl<'a> UnwindSafe for Item<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more