pub enum Text<'a> {
Source(Range<usize>),
Literal(&'static str),
Value(Cow<'a, str>),
}Expand description
A semantic value, independent of the lifetime of parser scratch storage.
Variants§
Source(Range<usize>)
Unchanged UTF-8 bytes in the document’s immutable source buffer.
Literal(&'static str)
A decoded constant requiring no owned allocation.
Value(Cow<'a, str>)
A constructed or edited value.
Implementations§
Trait Implementations§
impl<'a> Eq for Text<'a>
impl<'a> StructuralPartialEq for Text<'a>
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnsafeUnpin for Text<'a>
impl<'a> UnwindSafe for Text<'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