pub struct DestructibleApi<Vm: ApiVm> {
pub sem_id: SemId,
pub arithmetics: Vm::Arithm,
pub adaptor: Vm::Adaptor,
}Fields§
§sem_id: SemId§arithmetics: Vm::ArithmState arithmetics engine used in constructing new contract operations.
adaptor: Vm::AdaptorProcedures which convert a state made of finite field elements StateData into a
structured type [StructData] and vice verse.
Implementations§
Source§impl<Vm: ApiVm> DestructibleApi<Vm>
impl<Vm: ApiVm> DestructibleApi<Vm>
pub fn convert(&self, value: StateValue, sys: &TypeSystem) -> Option<StrictVal>
pub fn build(&self, value: StrictVal, sys: &TypeSystem) -> StateValue
pub fn arithmetics(&self) -> &Vm::Arithm
Trait Implementations§
Source§impl<Vm: Clone + ApiVm> Clone for DestructibleApi<Vm>
impl<Vm: Clone + ApiVm> Clone for DestructibleApi<Vm>
Source§fn clone(&self) -> DestructibleApi<Vm>
fn clone(&self) -> DestructibleApi<Vm>
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 moreSource§impl<'de, Vm: ApiVm> Deserialize<'de> for DestructibleApi<Vm>
impl<'de, Vm: ApiVm> Deserialize<'de> for DestructibleApi<Vm>
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<Vm: Ord + ApiVm> Ord for DestructibleApi<Vm>
impl<Vm: Ord + ApiVm> Ord for DestructibleApi<Vm>
Source§fn cmp(&self, other: &DestructibleApi<Vm>) -> Ordering
fn cmp(&self, other: &DestructibleApi<Vm>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Vm: PartialOrd + ApiVm> PartialOrd for DestructibleApi<Vm>
impl<Vm: PartialOrd + ApiVm> PartialOrd for DestructibleApi<Vm>
Source§impl<Vm: ApiVm> Serialize for DestructibleApi<Vm>
impl<Vm: ApiVm> Serialize for DestructibleApi<Vm>
Source§impl<Vm: ApiVm> StrictDecode for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictDecode for DestructibleApi<Vm>
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl<Vm: ApiVm> StrictDumb for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictDumb for DestructibleApi<Vm>
fn strict_dumb() -> Self
Source§impl<Vm: ApiVm> StrictEncode for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictEncode for DestructibleApi<Vm>
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl<Vm: ApiVm> StrictStruct for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictStruct for DestructibleApi<Vm>
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl<Vm: ApiVm> StrictType for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictType for DestructibleApi<Vm>
const STRICT_LIB_NAME: &'static str = LIB_NAME_SONIC
fn strict_name() -> Option<TypeName>
impl<Vm: Eq + ApiVm> Eq for DestructibleApi<Vm>
impl<Vm: ApiVm> StrictProduct for DestructibleApi<Vm>
impl<Vm: ApiVm> StructuralPartialEq for DestructibleApi<Vm>
Auto Trait Implementations§
impl<Vm> Freeze for DestructibleApi<Vm>
impl<Vm> RefUnwindSafe for DestructibleApi<Vm>
impl<Vm> Send for DestructibleApi<Vm>
impl<Vm> Sync for DestructibleApi<Vm>
impl<Vm> Unpin for DestructibleApi<Vm>
impl<Vm> UnwindSafe for DestructibleApi<Vm>
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.