Struct syn_solidity::ItemFunction
source · pub struct ItemFunction {
pub attrs: Vec<Attribute>,
pub kind: FunctionKind,
pub name: Option<SolIdent>,
pub paren_token: Paren,
pub arguments: Parameters<Comma>,
pub attributes: FunctionAttributes,
pub returns: Option<Returns>,
pub body: FunctionBody,
}
Expand description
A function, constructor, fallback, receive, or modifier definition:
function helloWorld() external pure returns(string memory);
Solidity reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.functionDefinition
Fields§
§attrs: Vec<Attribute>
The syn
attributes of the function.
kind: FunctionKind
§name: Option<SolIdent>
§paren_token: Paren
§arguments: Parameters<Comma>
§attributes: FunctionAttributes
The Solidity attributes of the function.
returns: Option<Returns>
The optional return types of the function.
body: FunctionBody
Implementations§
source§impl ItemFunction
impl ItemFunction
Trait Implementations§
source§impl Clone for ItemFunction
impl Clone for ItemFunction
source§fn clone(&self) -> ItemFunction
fn clone(&self) -> ItemFunction
Returns a copy 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 ItemFunction
impl Debug for ItemFunction
source§impl Parse for ItemFunction
impl Parse for ItemFunction
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl RefUnwindSafe for ItemFunction
impl !Send for ItemFunction
impl !Sync for ItemFunction
impl Unpin for ItemFunction
impl UnwindSafe for ItemFunction
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