pub struct NamedAbiValue {
pub name: Arc<str>,
pub value: AbiValue,
}Expand description
ABI value with name.
Fields§
§name: Arc<str>Item name.
value: AbiValueABI value.
Implementations§
Source§impl NamedAbiValue
impl NamedAbiValue
Sourcepub fn load_tuple(
items: &[NamedAbiType],
version: AbiVersion,
slice: &mut CellSlice<'_>,
) -> Result<Vec<Self>>
pub fn load_tuple( items: &[NamedAbiType], version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Vec<Self>>
Loads exactly one tuple from the specified slice requiring it to be fully consumed.
Use NamedAbiValue::load_tuple_partial if you allow an ABI type to be a prefix.
Sourcepub fn load_tuple_partial(
items: &[NamedAbiType],
version: AbiVersion,
slice: &mut CellSlice<'_>,
) -> Result<Vec<Self>>
pub fn load_tuple_partial( items: &[NamedAbiType], version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Vec<Self>>
Loads a tuple from the specified slice.
Sourcepub fn load_tuple_ext(
items: &[NamedAbiType],
version: AbiVersion,
last: bool,
allow_partial: bool,
slice: &mut CellSlice<'_>,
) -> Result<Vec<Self>>
pub fn load_tuple_ext( items: &[NamedAbiType], version: AbiVersion, last: bool, allow_partial: bool, slice: &mut CellSlice<'_>, ) -> Result<Vec<Self>>
Loads a tuple from the specified slice with explicit decoder params.
NOTE: this method does not check the remaining bits and refs in the root slice.
Sourcepub fn load(
ty: &NamedAbiType,
version: AbiVersion,
slice: &mut CellSlice<'_>,
) -> Result<Self>
pub fn load( ty: &NamedAbiType, version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Self>
Loads exactly one ABI value from the specified slice requiring it to be fully consumed.
Use NamedAbiValue::load_partial if you allow an ABI type to be a prefix.
Sourcepub fn load_partial(
ty: &NamedAbiType,
version: AbiVersion,
slice: &mut CellSlice<'_>,
) -> Result<Self>
pub fn load_partial( ty: &NamedAbiType, version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Self>
Loads an ABI value from the specified slice.
Sourcepub fn load_ext(
ty: &NamedAbiType,
version: AbiVersion,
last: bool,
allow_partial: bool,
slice: &mut CellSlice<'_>,
) -> Result<Self>
pub fn load_ext( ty: &NamedAbiType, version: AbiVersion, last: bool, allow_partial: bool, slice: &mut CellSlice<'_>, ) -> Result<Self>
Loads an ABI value from the specified slice with explicit decoder params.
NOTE: this method does not check the remaining bits and refs in the root slice.
Source§impl NamedAbiValue
impl NamedAbiValue
Sourcepub fn tuple_to_builder(
items: &[Self],
version: AbiVersion,
) -> Result<CellBuilder, Error>
pub fn tuple_to_builder( items: &[Self], version: AbiVersion, ) -> Result<CellBuilder, Error>
Tries to store multiple values into a new builder according to the specified ABI version.
Sourcepub fn tuple_to_cell(items: &[Self], version: AbiVersion) -> Result<Cell, Error>
pub fn tuple_to_cell(items: &[Self], version: AbiVersion) -> Result<Cell, Error>
Builds a new cell from multiple values according to the specified ABI version.
Sourcepub fn make_builder(&self, version: AbiVersion) -> Result<CellBuilder, Error>
pub fn make_builder(&self, version: AbiVersion) -> Result<CellBuilder, Error>
Tries to store this value into a new builder according to the specified ABI version.
Source§impl NamedAbiValue
impl NamedAbiValue
Sourcepub fn check_types(items: &[Self], types: &[NamedAbiType]) -> Result<()>
pub fn check_types(items: &[Self], types: &[NamedAbiType]) -> Result<()>
Ensures that all values satisfy the provided types.
Sourcepub fn have_types(items: &[Self], types: &[NamedAbiType]) -> bool
pub fn have_types(items: &[Self], types: &[NamedAbiType]) -> bool
Returns whether all values satisfy the provided types.
Sourcepub fn from_index(index: usize, value: AbiValue) -> Self
pub fn from_index(index: usize, value: AbiValue) -> Self
Creates a named ABI value with an index name (e.g. value123).
Trait Implementations§
Source§impl Clone for NamedAbiValue
impl Clone for NamedAbiValue
Source§fn clone(&self) -> NamedAbiValue
fn clone(&self) -> NamedAbiValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamedAbiValue
impl Debug for NamedAbiValue
Source§impl IgnoreName for NamedAbiValue
impl IgnoreName for NamedAbiValue
Source§type Unnamed<'a> = &'a WithoutName<NamedAbiValue>
type Unnamed<'a> = &'a WithoutName<NamedAbiValue>
Source§fn ignore_name(&self) -> Self::Unnamed<'_>
fn ignore_name(&self) -> Self::Unnamed<'_>
WithoutName.Source§impl PartialEq for NamedAbiValue
impl PartialEq for NamedAbiValue
impl Eq for NamedAbiValue
impl StructuralPartialEq for NamedAbiValue
Auto Trait Implementations§
impl !Freeze for NamedAbiValue
impl !RefUnwindSafe for NamedAbiValue
impl Send for NamedAbiValue
impl Sync for NamedAbiValue
impl Unpin for NamedAbiValue
impl !UnwindSafe for NamedAbiValue
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
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
self to key and returns true if they are equal.