pub struct Argument { /* private fields */ }Expand description
One directive argument, retaining its raw CST and exact source ranges.
Implementations§
Source§impl Argument
impl Argument
Sourcepub fn syntax(&self) -> &SyntaxNode
pub fn syntax(&self) -> &SyntaxNode
The underlying argument node, including internal trivia.
Sourcepub fn text_range(&self) -> TextRange
pub fn text_range(&self) -> TextRange
The whole argument range, excluding its comma separator.
Sourcepub fn name_token(&self) -> Option<SyntaxToken<RLanguage>>
pub fn name_token(&self) -> Option<SyntaxToken<RLanguage>>
The optional keyword name token and its exact source range.
Sourcepub fn value(&self) -> Option<SyntaxElement<RLanguage>>
pub fn value(&self) -> Option<SyntaxElement<RLanguage>>
The argument’s value syntax, whether a token atom or compound node.
Sourcepub fn value_range(&self) -> Option<TextRange>
pub fn value_range(&self) -> Option<TextRange>
The exact range of Self::value.
Trait Implementations§
impl Eq for Argument
impl StructuralPartialEq for Argument
Auto Trait Implementations§
impl !RefUnwindSafe for Argument
impl !Send for Argument
impl !Sync for Argument
impl !UnwindSafe for Argument
impl Freeze for Argument
impl Unpin for Argument
impl UnsafeUnpin for Argument
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