pub struct Function { /* private fields */ }
Expand description
Definition of a function.
Implementations§
Source§impl Function
impl Function
Sourcepub fn name(&self) -> &FunctionName
pub fn name(&self) -> &FunctionName
Access the name of the function.
Sourcepub fn params(&self) -> &[FunctionParam]
pub fn params(&self) -> &[FunctionParam]
Access the parameters of the function.
Sourcepub fn ret(&self) -> Option<&AliasedType>
pub fn ret(&self) -> Option<&AliasedType>
Access the return type of the function.
An empty return type means that the function returns the unit value.
Sourcepub fn body(&self) -> &Expression
pub fn body(&self) -> &Expression
Access the body of the function.
Trait Implementations§
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more