pub struct Function {
pub attributes: Vec<Attribute>,
pub modifiers: Vec<Modifier>,
pub return_type: TypeRef,
pub name: Ident,
pub params: Vec<Param>,
pub return_bindings: Bindings,
pub body: Option<Block>,
pub span: Span,
}Expand description
A function.
Fields§
§attributes: Vec<Attribute>Attributes before the function.
modifiers: Vec<Modifier>Keywords before the return type.
return_type: TypeRefThe return type.
name: IdentThe function’s name.
params: Vec<Param>The parameters.
return_bindings: BindingsThe semantic or register of the return value.
body: Option<Block>The body; None for a declaration that ends in ;.
span: SpanThe whole function.
Trait Implementations§
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Forget for Function
impl Freeze for Functionwhere
*const u8 is !null: Freeze,
PhantomData<Attribute>: Freeze,
PhantomData<Modifier>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TypeArg>: Freeze,
PhantomData<Param>: Freeze,
PhantomData<Register>: Freeze,
PhantomData<Stmt>: Freeze,
impl Move for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Functionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
PhantomData<Modifier>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TypeArg>: UnsafeUnpin,
PhantomData<Param>: UnsafeUnpin,
PhantomData<Register>: UnsafeUnpin,
PhantomData<Stmt>: UnsafeUnpin,
impl UnwindSafe for Functionwhere
RawVecInner: UnwindSafe,
BoxRaw<Expr>: UnwindSafe,
BoxRaw<TypeRef>: UnwindSafe,
BoxRaw<Stmt>: UnwindSafe,
BoxRaw<StructDef>: UnwindSafe,
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