pub struct Function {
pub documentation: Option<Document>,
pub attributes: Vec<AttributeGroup>,
pub name: String,
pub parameters: Vec<Parameter>,
pub return_type: Option<DataType>,
pub body: Body,
}
Fieldsยง
ยงdocumentation: Option<Document>
ยงattributes: Vec<AttributeGroup>
ยงname: String
ยงparameters: Vec<Parameter>
ยงreturn_type: Option<DataType>
ยงbody: Body
Implementationsยง
Sourceยงimpl Function
impl Function
pub fn new<T: ToString>(name: T) -> Self
pub fn document(self, documentation: Document) -> Self
pub fn attributes(self, attributes: AttributeGroup) -> Self
pub fn parameter(self, parameter: Parameter) -> Self
pub fn returns(self, return_type: DataType) -> Self
pub fn body<T: Into<Body>>(self, body: T) -> Self
Trait Implementationsยง
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