pub struct FunctionDecl {
pub name: Ident,
pub params: Box<[Param]>,
pub body: Box<Block>,
pub return_type: Option<TypeHint>,
pub by_ref: bool,
pub attributes: Box<[Attribute]>,
pub doc_comment: Option<Comment>,
}Expand description
A function declaration.
Fields§
§name: IdentFunction name.
params: Box<[Param]>Parameters.
body: Box<Block>Function body.
return_type: Option<TypeHint>Declared return type.
by_ref: boolWhether it returns by reference.
attributes: Box<[Attribute]>Attributes on the function.
doc_comment: Option<Comment>Preceding doc comment.
Trait Implementations§
Source§impl Clone for FunctionDecl
impl Clone for FunctionDecl
Source§impl Debug for FunctionDecl
impl Debug for FunctionDecl
Auto Trait Implementations§
impl Freeze for FunctionDecl
impl RefUnwindSafe for FunctionDecl
impl Send for FunctionDecl
impl Sync for FunctionDecl
impl Unpin for FunctionDecl
impl UnsafeUnpin for FunctionDecl
impl UnwindSafe for FunctionDecl
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