pub struct Formal { /* private fields */ }Expand description
One function formal, retaining its name, complete source range, and optional default-value syntax.
Implementations§
Source§impl Formal
impl Formal
Sourcepub fn name(&self) -> SmolStr
pub fn name(&self) -> SmolStr
The formal’s name as written, including backticks for a non-syntactic name.
Sourcepub fn name_token(&self) -> SyntaxToken<RLanguage>
pub fn name_token(&self) -> SyntaxToken<RLanguage>
The name token and its exact source range.
Sourcepub fn text_range(&self) -> TextRange
pub fn text_range(&self) -> TextRange
The whole formal range, excluding its comma and surrounding trivia.
Sourcepub fn default(&self) -> Option<SyntaxElement<RLanguage>>
pub fn default(&self) -> Option<SyntaxElement<RLanguage>>
The default-value syntax, whether a token atom or compound node.
Sourcepub fn default_range(&self) -> Option<TextRange>
pub fn default_range(&self) -> Option<TextRange>
The exact source range of Self::default.
Trait Implementations§
impl Eq for Formal
impl StructuralPartialEq for Formal
Auto Trait Implementations§
impl !RefUnwindSafe for Formal
impl !Send for Formal
impl !Sync for Formal
impl !UnwindSafe for Formal
impl Freeze for Formal
impl Unpin for Formal
impl UnsafeUnpin for Formal
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