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 BodyDeclare)
Trait Implementations§
Source§impl<Attr: Clone, Mods: Clone, Name: Clone, Args: Clone, Return: Clone, Body: Clone> Clone for FunctionDef<Attr, Mods, Name, Args, Return, Body>
 
impl<Attr: Clone, Mods: Clone, Name: Clone, Args: Clone, Return: Clone, Body: Clone> Clone for FunctionDef<Attr, Mods, Name, Args, Return, Body>
Source§fn clone(&self) -> FunctionDef<Attr, Mods, Name, Args, Return, Body>
 
fn clone(&self) -> FunctionDef<Attr, Mods, Name, Args, Return, Body>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl<Attr: Debug, Mods: Debug, Name: Debug, Args: Debug, Return: Debug, Body: Debug> Debug for FunctionDef<Attr, Mods, Name, Args, Return, Body>
 
impl<Attr: Debug, Mods: Debug, Name: Debug, Args: Debug, Return: Debug, Body: Debug> Debug for FunctionDef<Attr, Mods, Name, Args, Return, Body>
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