pub struct FnDecl { /* private fields */ }Implementations§
Source§impl FnDecl
impl FnDecl
pub fn name_token(&self) -> Option<SyntaxToken>
pub fn param_list(&self) -> Option<ParamList>
Sourcepub fn return_type(&self) -> Option<TypeAnnotation>
pub fn return_type(&self) -> Option<TypeAnnotation>
The header’s : type return clause, if written (NG-C, #1489) —
fn probability(g: Guest): float { … }.
Sourcepub fn doc(&self) -> Option<DocComment>
pub fn doc(&self) -> Option<DocComment>
The leading /// doc comment, if one is attached (B0.6b).
Sourcepub fn is_pub(&self) -> bool
pub fn is_pub(&self) -> bool
See FlowDecl::is_pub.
Trait Implementations§
Source§impl AstNode for FnDecl
impl AstNode for FnDecl
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true for a node with a SyntaxKind this type can wrap.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.impl Eq for FnDecl
impl StructuralPartialEq for FnDecl
Auto Trait Implementations§
impl !RefUnwindSafe for FnDecl
impl !Send for FnDecl
impl !Sync for FnDecl
impl !UnwindSafe for FnDecl
impl Freeze for FnDecl
impl Unpin for FnDecl
impl UnsafeUnpin for FnDecl
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