pub struct CairoStruct {
pub abi: AbiTypeAny,
pub members: Vec<(String, AbiTypeAny)>,
pub generic_members: HashMap<String, (String, bool)>,
}
Fields§
§abi: AbiTypeAny
§members: Vec<(String, AbiTypeAny)>
Parsed types for each member.
generic_members: HashMap<String, (String, bool)>
Members name => (generic representation, is_generic).
Implementations§
Source§impl CairoStruct
impl CairoStruct
Sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Returns true if the struct is generic, false otherwise.
Sourcepub fn get_gentys(&self) -> Vec<String>
pub fn get_gentys(&self) -> Vec<String>
Returns the list of generic types, if any.
Sourcepub fn new(abi_name: &str, abi_members: &Vec<AbiNamedMember>) -> CairoStruct
pub fn new(abi_name: &str, abi_members: &Vec<AbiNamedMember>) -> CairoStruct
Initializes a new instance from the abi name and it’s members.
Sourcepub fn compare_generic_types(&self, existing_cs: &mut CairoStruct)
pub fn compare_generic_types(&self, existing_cs: &mut CairoStruct)
Compares the generic types for each members with an other CairoStruct
.
Trait Implementations§
Source§impl Clone for CairoStruct
impl Clone for CairoStruct
Source§fn clone(&self) -> CairoStruct
fn clone(&self) -> CairoStruct
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 moreAuto Trait Implementations§
impl Freeze for CairoStruct
impl RefUnwindSafe for CairoStruct
impl Send for CairoStruct
impl Sync for CairoStruct
impl Unpin for CairoStruct
impl UnwindSafe for CairoStruct
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