pub struct Function {
pub name: String,
pub receiver: Option<Parameter>,
pub params: Vec<Parameter>,
pub return_types: Vec<String>,
pub body: Block,
pub span: Range<usize>,
}Expand description
Represents a function declaration in Go source code.
Fields§
§name: StringThe function name.
receiver: Option<Parameter>The optional receiver for methods.
params: Vec<Parameter>The list of parameters.
return_types: Vec<String>The list of return type names.
body: BlockThe function body block.
span: Range<usize>The source span of the function declaration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
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
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