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
Trait Implementations§
source§impl PartialEq for SolStruct
impl PartialEq for SolStruct
impl StructuralPartialEq for SolStruct
Auto Trait Implementations§
impl RefUnwindSafe for SolStruct
impl Send for SolStruct
impl Sync for SolStruct
impl Unpin for SolStruct
impl UnwindSafe for SolStruct
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