pub struct NamedAbiType {
pub name: Arc<str>,
pub ty: AbiType,
}Expand description
ABI value type with name.
Fields§
§name: Arc<str>Item name.
ty: AbiTypeABI value type.
Implementations§
Source§impl NamedAbiType
impl NamedAbiType
Sourcepub fn from_index(index: usize, ty: AbiType) -> Self
pub fn from_index(index: usize, ty: AbiType) -> Self
Creates a named ABI type with an index name (e.g. value123).
Sourcepub fn flatten(self) -> NamedAbiTypeFlatten ⓘ
pub fn flatten(self) -> NamedAbiTypeFlatten ⓘ
Returns an iterator with the first-level tuple flattened.
Can be used to pass an ABI struct as arguments to the
FunctionBuilder::with_inputs or FunctionBuilder::with_outputs.
Source§impl NamedAbiType
impl NamedAbiType
Sourcepub fn make_default_value(&self) -> NamedAbiValue
pub fn make_default_value(&self) -> NamedAbiValue
Returns a default value corresponding to the this type.
Trait Implementations§
Source§impl AsRef<AbiType> for NamedAbiType
impl AsRef<AbiType> for NamedAbiType
Source§impl Clone for NamedAbiType
impl Clone for NamedAbiType
Source§fn clone(&self) -> NamedAbiType
fn clone(&self) -> NamedAbiType
Returns a duplicate 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 NamedAbiType
impl Debug for NamedAbiType
Source§impl<'de> Deserialize<'de> for NamedAbiType
impl<'de> Deserialize<'de> for NamedAbiType
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 Hash for NamedAbiType
impl Hash for NamedAbiType
Source§impl IgnoreName for NamedAbiType
impl IgnoreName for NamedAbiType
Source§type Unnamed<'a> = &'a WithoutName<NamedAbiType>
type Unnamed<'a> = &'a WithoutName<NamedAbiType>
Wrapped ABI entity.
Source§fn ignore_name(&self) -> Self::Unnamed<'_>
fn ignore_name(&self) -> Self::Unnamed<'_>
Wraps an ABI entity into
WithoutName.Source§impl PartialEq for NamedAbiType
impl PartialEq for NamedAbiType
Source§impl Serialize for NamedAbiType
impl Serialize for NamedAbiType
impl Eq for NamedAbiType
impl StructuralPartialEq for NamedAbiType
Auto Trait Implementations§
impl Freeze for NamedAbiType
impl RefUnwindSafe for NamedAbiType
impl Send for NamedAbiType
impl Sync for NamedAbiType
impl Unpin for NamedAbiType
impl UnwindSafe for NamedAbiType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self to key and returns true if they are equal.