pub enum FieldValue<'a> {
NodeId(AnyNodeId),
Span(&'a str),
Bool(bool),
Flags(u8),
Enum(u32),
}Expand description
Reflected field value extracted from a node.
Used by grammar-agnostic AST tooling built on
AnyParsedStatement::extract_fields.
Variants§
NodeId(AnyNodeId)
A child node reference.
Span(&'a str)
A source text span — a subslice of the original source string.
Bool(bool)
A boolean flag.
Flags(u8)
A compact bitfield of flags.
Enum(u32)
An enum discriminant.
Trait Implementations§
Source§impl<'a> Clone for FieldValue<'a>
impl<'a> Clone for FieldValue<'a>
Source§fn clone(&self) -> FieldValue<'a>
fn clone(&self) -> FieldValue<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for FieldValue<'a>
impl<'a> Debug for FieldValue<'a>
impl<'a> Copy for FieldValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for FieldValue<'a>
impl<'a> RefUnwindSafe for FieldValue<'a>
impl<'a> Send for FieldValue<'a>
impl<'a> Sync for FieldValue<'a>
impl<'a> Unpin for FieldValue<'a>
impl<'a> UnsafeUnpin for FieldValue<'a>
impl<'a> UnwindSafe for FieldValue<'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