pub struct DefineFunction {
pub name: Spanned<String>,
pub params: Vec<(Spanned<String>, Option<Spanned<TypeExpr>>)>,
pub body: Option<Block>,
pub return_ty: Option<Spanned<TypeExpr>>,
}Expand description
DEFINE FUNCTION fn::name(...).
Fields§
§name: Spanned<String>The function name including the fn:: path.
params: Vec<(Spanned<String>, Option<Spanned<TypeExpr>>)>Parameters with their declared types, if any.
body: Option<Block>The function body.
return_ty: Option<Spanned<TypeExpr>>The declared return type, if any.
Trait Implementations§
Source§impl Clone for DefineFunction
impl Clone for DefineFunction
Source§fn clone(&self) -> DefineFunction
fn clone(&self) -> DefineFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DefineFunction
impl Debug for DefineFunction
Source§impl PartialEq for DefineFunction
impl PartialEq for DefineFunction
impl StructuralPartialEq for DefineFunction
Auto Trait Implementations§
impl Freeze for DefineFunction
impl RefUnwindSafe for DefineFunction
impl Send for DefineFunction
impl Sync for DefineFunction
impl Unpin for DefineFunction
impl UnsafeUnpin for DefineFunction
impl UnwindSafe for DefineFunction
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