pub struct NameGroup { /* private fields */ }Expand description
The {name} group following \begin / \end.
Implementations§
Source§impl NameGroup
impl NameGroup
Sourcepub fn text(&self) -> Option<String>
pub fn text(&self) -> Option<String>
The environment name — the literal text of this NAME_GROUP, braces dropped.
Returns None when it holds non-token content or a parameter token.
Sourcepub fn range(&self) -> Option<TextRange>
pub fn range(&self) -> Option<TextRange>
The byte range of the name inside this NAME_GROUP (the span between the
braces) — the location-aware counterpart to NameGroup::text. Returns
None when it holds a nested node or parameter token, or the name is empty
(\begin{}, nothing to highlight).
Trait Implementations§
Source§impl AstNode for NameGroup
impl AstNode for NameGroup
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
impl Eq for NameGroup
impl StructuralPartialEq for NameGroup
Auto Trait Implementations§
impl !RefUnwindSafe for NameGroup
impl !Send for NameGroup
impl !Sync for NameGroup
impl !UnwindSafe for NameGroup
impl Freeze for NameGroup
impl Unpin for NameGroup
impl UnsafeUnpin for NameGroup
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