pub struct Function {
pub doc: Doc,
pub returns: Type,
pub name: Ident,
pub params: Vec<Param>,
pub is_inline: bool,
pub is_static: bool,
pub is_constexpr: bool,
pub is_noexcept: bool,
pub is_maybe_unused: bool,
pub body: FunctionBody,
}Expand description
A function at namespace scope.
Fields§
§doc: DocDocumentation.
returns: TypeReturn type.
name: IdentName.
params: Vec<Param>Parameters.
is_inline: boolinline.
is_static: boolstatic.
is_constexpr: boolconstexpr.
is_noexcept: boolnoexcept.
is_maybe_unused: bool[[maybe_unused]] (C++17 §9.12.8): a function that may
legitimately have no caller, so -Wunused-function stays quiet
about it and only about it.
body: FunctionBodyThe body.
Trait Implementations§
impl Eq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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