pub struct VariableDeclaration {Show 19 fields
pub base_functions: Option<Vec<i64>>,
pub constant: bool,
pub documentation: Option<StructuredDocumentation>,
pub function_selector: Option<String>,
pub id: i64,
pub indexed: Option<bool>,
pub mutability: Mutability,
pub name: String,
pub name_location: Option<String>,
pub node_type: VariableDeclarationNodeType,
pub overrides: Option<OverrideSpecifier>,
pub scope: i64,
pub src: SourceLocation,
pub state_variable: bool,
pub storage_location: StorageLocation,
pub type_descriptions: TypeDescriptions,
pub type_name: Option<TypeName>,
pub value: Option<Expression>,
pub visibility: Visibility,
}
Expand description
VariableDeclaration
JSON schema
{
"type": "object",
"required": [
"constant",
"id",
"mutability",
"name",
"nodeType",
"scope",
"src",
"stateVariable",
"storageLocation",
"typeDescriptions",
"visibility"
],
"properties": {
"baseFunctions": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "null"
}
]
},
"constant": {
"type": "boolean"
},
"documentation": {
"anyOf": [
{
"$ref": "#/definitions/StructuredDocumentation"
},
{
"type": "null"
}
]
},
"functionSelector": {
"type": "string"
},
"id": {
"type": "integer"
},
"indexed": {
"type": "boolean"
},
"mutability": {
"$ref": "#/definitions/Mutability"
},
"name": {
"type": "string"
},
"nameLocation": {
"type": "string"
},
"nodeType": {
"enum": [
"VariableDeclaration"
]
},
"overrides": {
"anyOf": [
{
"$ref": "#/definitions/OverrideSpecifier"
},
{
"type": "null"
}
]
},
"scope": {
"type": "integer"
},
"src": {
"$ref": "#/definitions/SourceLocation"
},
"stateVariable": {
"type": "boolean"
},
"storageLocation": {
"$ref": "#/definitions/StorageLocation"
},
"typeDescriptions": {
"$ref": "#/definitions/TypeDescriptions"
},
"typeName": {
"anyOf": [
{
"$ref": "#/definitions/TypeName"
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"$ref": "#/definitions/Expression"
},
{
"type": "null"
}
]
},
"visibility": {
"$ref": "#/definitions/Visibility"
}
},
"additionalProperties": false
}
Fields§
§base_functions: Option<Vec<i64>>
§constant: bool
§documentation: Option<StructuredDocumentation>
§function_selector: Option<String>
§id: i64
§indexed: Option<bool>
§mutability: Mutability
§name: String
§name_location: Option<String>
§node_type: VariableDeclarationNodeType
§overrides: Option<OverrideSpecifier>
§scope: i64
§src: SourceLocation
§state_variable: bool
§storage_location: StorageLocation
§type_descriptions: TypeDescriptions
§type_name: Option<TypeName>
§value: Option<Expression>
§visibility: Visibility
Trait Implementations§
Source§impl Clone for VariableDeclaration
impl Clone for VariableDeclaration
Source§fn clone(&self) -> VariableDeclaration
fn clone(&self) -> VariableDeclaration
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 VariableDeclaration
impl Debug for VariableDeclaration
Source§impl<'de> Deserialize<'de> for VariableDeclaration
impl<'de> Deserialize<'de> for VariableDeclaration
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<&VariableDeclaration> for VariableDeclaration
impl From<&VariableDeclaration> for VariableDeclaration
Source§fn from(value: &VariableDeclaration) -> Self
fn from(value: &VariableDeclaration) -> Self
Converts to this type from the input type.
Source§impl From<VariableDeclaration> for ContractDefinitionNodesItem
impl From<VariableDeclaration> for ContractDefinitionNodesItem
Source§fn from(value: VariableDeclaration) -> Self
fn from(value: VariableDeclaration) -> Self
Converts to this type from the input type.
Source§impl From<VariableDeclaration> for SourceUnitNodesItem
impl From<VariableDeclaration> for SourceUnitNodesItem
Source§fn from(value: VariableDeclaration) -> Self
fn from(value: VariableDeclaration) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VariableDeclaration
impl RefUnwindSafe for VariableDeclaration
impl Send for VariableDeclaration
impl Sync for VariableDeclaration
impl Unpin for VariableDeclaration
impl UnwindSafe for VariableDeclaration
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