pub struct FunctionDecl {
pub span: Span,
pub return_type: TypeSpec,
pub name: String,
pub parameters: Vec<Parameter>,
pub body: Option<BlockStmt>,
}Expand description
One parsed function declaration or definition.
Fields§
§span: SpanSource span covering the whole declaration or definition.
return_type: TypeSpecFunction return type.
name: StringFunction name.
parameters: Vec<Parameter>Function parameters in source order.
body: Option<BlockStmt>Optional function body. None means this was only a declaration.
Trait Implementations§
Source§impl Clone for FunctionDecl
impl Clone for FunctionDecl
Source§fn clone(&self) -> FunctionDecl
fn clone(&self) -> FunctionDecl
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 Debug for FunctionDecl
impl Debug for FunctionDecl
Source§impl<'de> Deserialize<'de> for FunctionDecl
impl<'de> Deserialize<'de> for FunctionDecl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FunctionDecl
impl PartialEq for FunctionDecl
Source§impl Serialize for FunctionDecl
impl Serialize for FunctionDecl
impl StructuralPartialEq for FunctionDecl
Auto Trait Implementations§
impl Freeze for FunctionDecl
impl RefUnwindSafe for FunctionDecl
impl Send for FunctionDecl
impl Sync for FunctionDecl
impl Unpin for FunctionDecl
impl UnsafeUnpin for FunctionDecl
impl UnwindSafe for FunctionDecl
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