pub enum ProvenancePart {
Source(Range<usize>),
Synthesized(String),
OpaqueTag(String),
}Expand description
A single component of a token’s provenance.
Variants§
Source(Range<usize>)
Part of the text comes directly from a source range.
Synthesized(String)
Part of the text is synthesized (e.g., by a macro). The string is typically an interned ID or a small literal.
OpaqueTag(String)
An opaque tag for language-specific transformations (e.g., case conversion). Oak doesn’t understand these tags, but passes them to the LSP/IDE.
Trait Implementations§
Source§impl Clone for ProvenancePart
impl Clone for ProvenancePart
Source§fn clone(&self) -> ProvenancePart
fn clone(&self) -> ProvenancePart
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 Debug for ProvenancePart
impl Debug for ProvenancePart
Source§impl<'de> Deserialize<'de> for ProvenancePart
impl<'de> Deserialize<'de> for ProvenancePart
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ProvenancePart
impl Hash for ProvenancePart
Source§impl PartialEq for ProvenancePart
impl PartialEq for ProvenancePart
Source§impl Serialize for ProvenancePart
impl Serialize for ProvenancePart
impl Eq for ProvenancePart
impl StructuralPartialEq for ProvenancePart
Auto Trait Implementations§
impl Freeze for ProvenancePart
impl RefUnwindSafe for ProvenancePart
impl Send for ProvenancePart
impl Sync for ProvenancePart
impl Unpin for ProvenancePart
impl UnsafeUnpin for ProvenancePart
impl UnwindSafe for ProvenancePart
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