pub struct FunctionDefinition {Show 19 fields
pub base_functions: Option<Vec<i64>>,
pub body: Option<Block>,
pub documentation: Option<StructuredDocumentation>,
pub function_selector: Option<String>,
pub id: i64,
pub implemented: bool,
pub kind: FunctionDefinitionKind,
pub modifiers: Vec<ModifierInvocation>,
pub name: String,
pub name_location: Option<String>,
pub node_type: FunctionDefinitionNodeType,
pub overrides: Option<OverrideSpecifier>,
pub parameters: ParameterList,
pub return_parameters: ParameterList,
pub scope: i64,
pub src: SourceLocation,
pub state_mutability: StateMutability,
pub virtual_: bool,
pub visibility: Visibility,
}
Expand description
FunctionDefinition
JSON schema
{
"type": "object",
"required": [
"id",
"implemented",
"kind",
"modifiers",
"name",
"nodeType",
"parameters",
"returnParameters",
"scope",
"src",
"stateMutability",
"virtual",
"visibility"
],
"properties": {
"baseFunctions": {
"type": "array",
"items": {
"type": "integer"
}
},
"body": {
"anyOf": [
{
"$ref": "#/definitions/Block"
},
{
"type": "null"
}
]
},
"documentation": {
"anyOf": [
{
"$ref": "#/definitions/StructuredDocumentation"
},
{
"type": "null"
}
]
},
"functionSelector": {
"type": "string"
},
"id": {
"type": "integer"
},
"implemented": {
"type": "boolean"
},
"kind": {
"enum": [
"function",
"receive",
"constructor",
"fallback",
"freeFunction"
]
},
"modifiers": {
"type": "array",
"items": {
"$ref": "#/definitions/ModifierInvocation"
}
},
"name": {
"type": "string"
},
"nameLocation": {
"type": "string"
},
"nodeType": {
"enum": [
"FunctionDefinition"
]
},
"overrides": {
"anyOf": [
{
"$ref": "#/definitions/OverrideSpecifier"
},
{
"type": "null"
}
]
},
"parameters": {
"$ref": "#/definitions/ParameterList"
},
"returnParameters": {
"$ref": "#/definitions/ParameterList"
},
"scope": {
"type": "integer"
},
"src": {
"$ref": "#/definitions/SourceLocation"
},
"stateMutability": {
"$ref": "#/definitions/StateMutability"
},
"virtual": {
"type": "boolean"
},
"visibility": {
"$ref": "#/definitions/Visibility"
}
},
"additionalProperties": false
}
Fields§
§base_functions: Option<Vec<i64>>
§body: Option<Block>
§documentation: Option<StructuredDocumentation>
§function_selector: Option<String>
§id: i64
§implemented: bool
§kind: FunctionDefinitionKind
§modifiers: Vec<ModifierInvocation>
§name: String
§name_location: Option<String>
§node_type: FunctionDefinitionNodeType
§overrides: Option<OverrideSpecifier>
§parameters: ParameterList
§return_parameters: ParameterList
§scope: i64
§src: SourceLocation
§state_mutability: StateMutability
§virtual_: bool
§visibility: Visibility
Trait Implementations§
Source§impl Clone for FunctionDefinition
impl Clone for FunctionDefinition
Source§fn clone(&self) -> FunctionDefinition
fn clone(&self) -> FunctionDefinition
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 FunctionDefinition
impl Debug for FunctionDefinition
Source§impl<'de> Deserialize<'de> for FunctionDefinition
impl<'de> Deserialize<'de> for FunctionDefinition
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 From<&FunctionDefinition> for FunctionDefinition
impl From<&FunctionDefinition> for FunctionDefinition
Source§fn from(value: &FunctionDefinition) -> Self
fn from(value: &FunctionDefinition) -> Self
Converts to this type from the input type.
Source§impl From<FunctionDefinition> for ContractDefinitionNodesItem
impl From<FunctionDefinition> for ContractDefinitionNodesItem
Source§fn from(value: FunctionDefinition) -> Self
fn from(value: FunctionDefinition) -> Self
Converts to this type from the input type.
Source§impl From<FunctionDefinition> for SourceUnitNodesItem
impl From<FunctionDefinition> for SourceUnitNodesItem
Source§fn from(value: FunctionDefinition) -> Self
fn from(value: FunctionDefinition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FunctionDefinition
impl RefUnwindSafe for FunctionDefinition
impl Send for FunctionDefinition
impl Sync for FunctionDefinition
impl Unpin for FunctionDefinition
impl UnwindSafe for FunctionDefinition
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