pub struct Directive { /* private fields */ }Expand description
A named call in a namespace directive position.
Implementations§
Source§impl Directive
impl Directive
Sourcepub fn kind(&self) -> DirectiveKind
pub fn kind(&self) -> DirectiveKind
The recognized directive kind, or DirectiveKind::Unsupported.
Sourcepub fn name(&self) -> Option<SmolStr>
pub fn name(&self) -> Option<SmolStr>
The directive name, with quotes removed when it was quoted.
Sourcepub fn name_token(&self) -> Option<SyntaxToken<RLanguage>>
pub fn name_token(&self) -> Option<SyntaxToken<RLanguage>>
The directive name token and its exact source range.
Sourcepub fn syntax(&self) -> &SyntaxNode
pub fn syntax(&self) -> &SyntaxNode
The call node, including its arguments and internal trivia.
Sourcepub fn text_range(&self) -> TextRange
pub fn text_range(&self) -> TextRange
The full namespace expression’s range.
This equals the call range for an ordinary directive and includes the
assignment wrapper for dll <- useDynLib(...).
Sourcepub fn call_range(&self) -> TextRange
pub fn call_range(&self) -> TextRange
The directive call’s range, excluding an optional assignment wrapper.
Sourcepub fn l_paren(&self) -> Option<SyntaxToken<RLanguage>>
pub fn l_paren(&self) -> Option<SyntaxToken<RLanguage>>
The opening (, if recovery produced one.
Sourcepub fn r_paren(&self) -> Option<SyntaxToken<RLanguage>>
pub fn r_paren(&self) -> Option<SyntaxToken<RLanguage>>
The closing ), if recovery produced one.
Trait Implementations§
impl Eq for Directive
impl StructuralPartialEq for Directive
Auto Trait Implementations§
impl !RefUnwindSafe for Directive
impl !Send for Directive
impl !Sync for Directive
impl !UnwindSafe for Directive
impl Freeze for Directive
impl Unpin for Directive
impl UnsafeUnpin for Directive
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