pub struct FunctionDef<Attr, Mods, Name, Args, Return, Body> {
    pub attr: Attr,
    pub mods: Mods,
    pub decl: Function<Name, Args>,
    pub return_type: Return,
    pub body: Body,
}Expand description
A function declaration
Fields§
§attr: AttrThe attributes. Must be a sequence, and each value will be placed inside #[].
mods: ModsThe modifiers. Must be a sequence.
decl: Function<Name, Args>The function itself
return_type: ReturnThe return type, i.e. after the -> arrow
body: BodyThe function body. At the minimum, this must be ; (see FunctionBodyDeclare)
Trait Implementations§
Source§impl<O, Attr, Mods, Name, Args, Return, Body> Writable<O> for FunctionDef<Attr, Mods, Name, Args, Return, Body>where
    O: Output,
    Attr: WritableSeq<O>,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    Args: WritableSeq<O>,
    Return: Writable<O>,
    Body: Writable<O>,
 
impl<O, Attr, Mods, Name, Args, Return, Body> Writable<O> for FunctionDef<Attr, Mods, Name, Args, Return, Body>where
    O: Output,
    Attr: WritableSeq<O>,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    Args: WritableSeq<O>,
    Return: Writable<O>,
    Body: Writable<O>,
Auto Trait Implementations§
impl<Attr, Mods, Name, Args, Return, Body> Freeze for FunctionDef<Attr, Mods, Name, Args, Return, Body>
impl<Attr, Mods, Name, Args, Return, Body> RefUnwindSafe for FunctionDef<Attr, Mods, Name, Args, Return, Body>where
    Attr: RefUnwindSafe,
    Mods: RefUnwindSafe,
    Return: RefUnwindSafe,
    Body: RefUnwindSafe,
    Name: RefUnwindSafe,
    Args: RefUnwindSafe,
impl<Attr, Mods, Name, Args, Return, Body> Send for FunctionDef<Attr, Mods, Name, Args, Return, Body>
impl<Attr, Mods, Name, Args, Return, Body> Sync for FunctionDef<Attr, Mods, Name, Args, Return, Body>
impl<Attr, Mods, Name, Args, Return, Body> Unpin for FunctionDef<Attr, Mods, Name, Args, Return, Body>
impl<Attr, Mods, Name, Args, Return, Body> UnwindSafe for FunctionDef<Attr, Mods, Name, Args, Return, Body>where
    Attr: UnwindSafe,
    Mods: UnwindSafe,
    Return: UnwindSafe,
    Body: UnwindSafe,
    Name: UnwindSafe,
    Args: 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