pub struct ContractDefinition {Show 18 fields
pub abstract_: bool,
pub base_contracts: Vec<InheritanceSpecifier>,
pub canonical_name: Option<String>,
pub contract_dependencies: Vec<i64>,
pub contract_kind: ContractDefinitionContractKind,
pub documentation: Option<StructuredDocumentation>,
pub fully_implemented: bool,
pub id: i64,
pub internal_function_i_ds: HashMap<String, i64>,
pub linearized_base_contracts: Vec<i64>,
pub name: String,
pub name_location: Option<String>,
pub node_type: ContractDefinitionNodeType,
pub nodes: Vec<ContractDefinitionNodesItem>,
pub scope: i64,
pub src: SourceLocation,
pub used_errors: Vec<i64>,
pub used_events: Vec<i64>,
}
Expand description
ContractDefinition
JSON schema
{
"type": "object",
"required": [
"abstract",
"baseContracts",
"contractDependencies",
"contractKind",
"fullyImplemented",
"id",
"linearizedBaseContracts",
"name",
"nodeType",
"nodes",
"scope",
"src"
],
"properties": {
"abstract": {
"type": "boolean"
},
"baseContracts": {
"type": "array",
"items": {
"$ref": "#/definitions/InheritanceSpecifier"
}
},
"canonicalName": {
"type": "string"
},
"contractDependencies": {
"type": "array",
"items": {
"type": "integer"
}
},
"contractKind": {
"enum": [
"contract",
"interface",
"library"
]
},
"documentation": {
"anyOf": [
{
"$ref": "#/definitions/StructuredDocumentation"
},
{
"type": "null"
}
]
},
"fullyImplemented": {
"type": "boolean"
},
"id": {
"type": "integer"
},
"internalFunctionIDs": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"linearizedBaseContracts": {
"type": "array",
"items": {
"type": "integer"
}
},
"name": {
"type": "string"
},
"nameLocation": {
"type": "string"
},
"nodeType": {
"enum": [
"ContractDefinition"
]
},
"nodes": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/EnumDefinition"
},
{
"$ref": "#/definitions/ErrorDefinition"
},
{
"$ref": "#/definitions/EventDefinition"
},
{
"$ref": "#/definitions/FunctionDefinition"
},
{
"$ref": "#/definitions/ModifierDefinition"
},
{
"$ref": "#/definitions/StructDefinition"
},
{
"$ref": "#/definitions/UserDefinedValueTypeDefinition"
},
{
"$ref": "#/definitions/UsingForDirective"
},
{
"$ref": "#/definitions/VariableDeclaration"
}
]
}
},
"scope": {
"type": "integer"
},
"src": {
"$ref": "#/definitions/SourceLocation"
},
"usedErrors": {
"type": "array",
"items": {
"type": "integer"
}
},
"usedEvents": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"additionalProperties": false
}
Fields§
§abstract_: bool
§base_contracts: Vec<InheritanceSpecifier>
§canonical_name: Option<String>
§contract_dependencies: Vec<i64>
§contract_kind: ContractDefinitionContractKind
§documentation: Option<StructuredDocumentation>
§fully_implemented: bool
§id: i64
§internal_function_i_ds: HashMap<String, i64>
§linearized_base_contracts: Vec<i64>
§name: String
§name_location: Option<String>
§node_type: ContractDefinitionNodeType
§nodes: Vec<ContractDefinitionNodesItem>
§scope: i64
§src: SourceLocation
§used_errors: Vec<i64>
§used_events: Vec<i64>
Trait Implementations§
Source§impl Clone for ContractDefinition
impl Clone for ContractDefinition
Source§fn clone(&self) -> ContractDefinition
fn clone(&self) -> ContractDefinition
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 ContractDefinition
impl Debug for ContractDefinition
Source§impl<'de> Deserialize<'de> for ContractDefinition
impl<'de> Deserialize<'de> for ContractDefinition
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<&ContractDefinition> for ContractDefinition
impl From<&ContractDefinition> for ContractDefinition
Source§fn from(value: &ContractDefinition) -> Self
fn from(value: &ContractDefinition) -> Self
Converts to this type from the input type.
Source§impl From<ContractDefinition> for SourceUnitNodesItem
impl From<ContractDefinition> for SourceUnitNodesItem
Source§fn from(value: ContractDefinition) -> Self
fn from(value: ContractDefinition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContractDefinition
impl RefUnwindSafe for ContractDefinition
impl Send for ContractDefinition
impl Sync for ContractDefinition
impl Unpin for ContractDefinition
impl UnwindSafe for ContractDefinition
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