pub enum MetaExtract<'a> {
Undefined,
Identifier(&'a str),
Meta(&'a Meta),
Value(&'a MetaValue),
}Expand description
What a lookup into a Meta tree found.
Variants§
Undefined
Nothing was found.
Identifier(&'a str)
The name itself, present as a bare identifier.
Meta(&'a Meta)
A subtree.
Value(&'a MetaValue)
A literal.
Implementations§
Source§impl MetaExtract<'_>
impl MetaExtract<'_>
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Returns true when nothing was found.
Sourcepub fn as_identifier(&self) -> Option<&str>
pub fn as_identifier(&self) -> Option<&str>
Returns the identifier, or None for any other kind.
Trait Implementations§
Source§impl<'a> Debug for MetaExtract<'a>
impl<'a> Debug for MetaExtract<'a>
Source§impl<'a> PartialEq for MetaExtract<'a>
impl<'a> PartialEq for MetaExtract<'a>
impl<'a> StructuralPartialEq for MetaExtract<'a>
Auto Trait Implementations§
impl<'a> Freeze for MetaExtract<'a>
impl<'a> RefUnwindSafe for MetaExtract<'a>
impl<'a> Send for MetaExtract<'a>
impl<'a> Sync for MetaExtract<'a>
impl<'a> Unpin for MetaExtract<'a>
impl<'a> UnsafeUnpin for MetaExtract<'a>
impl<'a> UnwindSafe for MetaExtract<'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