NamedAbiValue

Struct NamedAbiValue 

Source
pub struct NamedAbiValue {
    pub name: Arc<str>,
    pub value: AbiValue,
}
Expand description

ABI value with name.

Fields§

§name: Arc<str>

Item name.

§value: AbiValue

ABI value.

Implementations§

Source§

impl NamedAbiValue

Source

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.

Source

pub fn load_tuple_partial( items: &[NamedAbiType], version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Vec<Self>>

Loads a tuple from the specified slice.

Source

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.

Source

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.

Source

pub fn load_partial( ty: &NamedAbiType, version: AbiVersion, slice: &mut CellSlice<'_>, ) -> Result<Self>

Loads an ABI value from the specified slice.

Source

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

Source

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.

Source

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.

Source

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

pub fn make_cell(&self, version: AbiVersion) -> Result<Cell, Error>

Builds a new cell from this value according to the specified ABI version.

Source§

impl NamedAbiValue

Source

pub fn check_types(items: &[Self], types: &[NamedAbiType]) -> Result<()>

Ensures that all values satisfy the provided types.

Source

pub fn have_types(items: &[Self], types: &[NamedAbiType]) -> bool

Returns whether all values satisfy the provided types.

Source

pub fn from_index(index: usize, value: AbiValue) -> Self

Creates a named ABI value with an index name (e.g. value123).

Source

pub fn check_type<T: AsRef<AbiType>>(&self, ty: T) -> Result<()>

Ensures that value satisfies the type.

Trait Implementations§

Source§

impl Clone for NamedAbiValue

Source§

fn clone(&self) -> NamedAbiValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NamedAbiValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<(&'a str, AbiValue)> for NamedAbiValue

Source§

fn from((name, value): (&'a str, AbiValue)) -> Self

Converts to this type from the input type.
Source§

impl From<(String, AbiValue)> for NamedAbiValue

Source§

fn from((name, value): (String, AbiValue)) -> Self

Converts to this type from the input type.
Source§

impl From<(usize, AbiValue)> for NamedAbiValue

Source§

fn from((index, value): (usize, AbiValue)) -> Self

Converts to this type from the input type.
Source§

impl IgnoreName for NamedAbiValue

Source§

type Unnamed<'a> = &'a WithoutName<NamedAbiValue>

Wrapped ABI entity.
Source§

fn ignore_name(&self) -> Self::Unnamed<'_>

Wraps an ABI entity into WithoutName.
Source§

impl PartialEq for NamedAbiValue

Source§

fn eq(&self, other: &NamedAbiValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for NamedAbiValue

Source§

impl StructuralPartialEq for NamedAbiValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compares self to key and returns true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> EquivalentRepr<T> for T