pub struct VariantDef {
pub variant_name: Ident,
pub kind: String,
pub named: bool,
pub is_supertype: bool,
pub extra_kinds: Vec<String>,
}Fields§
§variant_name: Ident§kind: String§named: bool§is_supertype: boolTrue if this variant references a supertype (has subtypes in the grammar). Supertypes are abstract — tree-sitter never emits them as node kinds at runtime.
extra_kinds: Vec<String>Additional kind strings that map to the same variant name (e.g., “a” and “A” both → A).
Populated during deduplication in the emitter.
Trait Implementations§
Source§impl Clone for VariantDef
impl Clone for VariantDef
Source§fn clone(&self) -> VariantDef
fn clone(&self) -> VariantDef
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 moreAuto Trait Implementations§
impl Freeze for VariantDef
impl RefUnwindSafe for VariantDef
impl !Send for VariantDef
impl !Sync for VariantDef
impl Unpin for VariantDef
impl UnsafeUnpin for VariantDef
impl UnwindSafe for VariantDef
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