Struct ethers_core::abi::struct_def::SolStruct
source · pub struct SolStruct {
pub name: String,
pub fields: Vec<FieldDeclaration>,
}
Expand description
Represents a solidity struct
Fields§
§name: String
§fields: Vec<FieldDeclaration>
Implementations§
source§impl SolStruct
impl SolStruct
sourcepub fn parse(s: &str) -> Result<Self, ParseError>
pub fn parse(s: &str) -> Result<Self, ParseError>
Parse a solidity struct definition
Example
let s = SolStruct::parse("struct MyStruct { uint x; uint y;}").unwrap();
sourcepub fn fields(&self) -> &Vec<FieldDeclaration> ⓘ
pub fn fields(&self) -> &Vec<FieldDeclaration> ⓘ
All the fields of this struct
sourcepub fn has_nameless_field(&self) -> bool
pub fn has_nameless_field(&self) -> bool
Returns true
if a field with an empty name exists