pub struct SourceUnit {
pub absolute_path: String,
pub experimental_solidity: Option<bool>,
pub exported_symbols: Option<HashMap<String, Vec<i64>>>,
pub id: i64,
pub license: Option<String>,
pub node_type: SourceUnitNodeType,
pub nodes: Vec<SourceUnitNodesItem>,
pub src: SourceLocation,
}
Expand description
SourceUnit
JSON schema
{
"title": "SourceUnit",
"type": "object",
"required": [
"absolutePath",
"exportedSymbols",
"id",
"nodeType",
"nodes",
"src"
],
"properties": {
"absolutePath": {
"type": "string"
},
"experimentalSolidity": {
"type": "boolean"
},
"exportedSymbols": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"id": {
"type": "integer"
},
"license": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"nodeType": {
"enum": [
"SourceUnit"
]
},
"nodes": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/ContractDefinition"
},
{
"$ref": "#/definitions/EnumDefinition"
},
{
"$ref": "#/definitions/ErrorDefinition"
},
{
"$ref": "#/definitions/FunctionDefinition"
},
{
"$ref": "#/definitions/ImportDirective"
},
{
"$ref": "#/definitions/PragmaDirective"
},
{
"$ref": "#/definitions/StructDefinition"
},
{
"$ref": "#/definitions/UserDefinedValueTypeDefinition"
},
{
"$ref": "#/definitions/UsingForDirective"
},
{
"$ref": "#/definitions/VariableDeclaration"
}
]
}
},
"src": {
"$ref": "#/definitions/SourceLocation"
}
},
"additionalProperties": false
}
Fields§
§absolute_path: String
§experimental_solidity: Option<bool>
§exported_symbols: Option<HashMap<String, Vec<i64>>>
§id: i64
§license: Option<String>
§node_type: SourceUnitNodeType
§nodes: Vec<SourceUnitNodesItem>
§src: SourceLocation
Trait Implementations§
Source§impl Clone for SourceUnit
impl Clone for SourceUnit
Source§fn clone(&self) -> SourceUnit
fn clone(&self) -> SourceUnit
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 SourceUnit
impl Debug for SourceUnit
Source§impl<'de> Deserialize<'de> for SourceUnit
impl<'de> Deserialize<'de> for SourceUnit
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<&SourceUnit> for SourceUnit
impl From<&SourceUnit> for SourceUnit
Source§fn from(value: &SourceUnit) -> Self
fn from(value: &SourceUnit) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SourceUnit
impl RefUnwindSafe for SourceUnit
impl Send for SourceUnit
impl Sync for SourceUnit
impl Unpin for SourceUnit
impl UnwindSafe for SourceUnit
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