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
sourceimpl 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn fields(&self) -> &Vec<FieldDeclaration>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
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
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more