pub struct OwnedApi {
pub sem_id: SemId,
pub arithmetics: StateArithm,
pub convertor: StateConvertor,
pub builder: StateBuilder,
pub witness_sem_id: SemId,
pub witness_builder: StateBuilder,
}Expand description
API for owned (destrictible, or read-once) state.
API covers two main functions: taking structured data from the user input and building a valid state included in a new contract operation - and taking contract state and converting it into a user-friendly form, as structured data. It also allows constructing a state for witness, allowing destroying previously defined state.
Fields§
§sem_id: SemIdSemantic type id for the structured converted state data.
arithmetics: StateArithmState arithmetics engine used in constructing new contract operations.
convertor: StateConvertorProcedure which converts a state made of finite field elements StateValue into a
structured type StrictVal.
builder: StateBuilderProcedure which builds a state in the form of field elements StateValue out of a
structured type StrictVal.
witness_sem_id: SemIdSemantic type id for the witness data.
witness_builder: StateBuilderProcedure which converts structured data in the form of StrictVal into a witness made of
finite field elements in the form of StateValue for the destroyed previous state (an
input of an operation).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OwnedApi
impl<'de> Deserialize<'de> for OwnedApi
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>,
Source§impl Ord for OwnedApi
impl Ord for OwnedApi
Source§impl PartialOrd for OwnedApi
impl PartialOrd for OwnedApi
Source§impl StrictDecode for OwnedApi
impl StrictDecode for OwnedApi
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for OwnedApi
impl StrictDumb for OwnedApi
fn strict_dumb() -> Self
Source§impl StrictEncode for OwnedApi
impl StrictEncode for OwnedApi
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for OwnedApi
impl StrictStruct for OwnedApi
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for OwnedApi
impl StrictType for OwnedApi
const STRICT_LIB_NAME: &'static str = LIB_NAME_SONIC
fn strict_name() -> Option<TypeName>
impl Eq for OwnedApi
impl StrictProduct for OwnedApi
impl StructuralPartialEq for OwnedApi
Auto Trait Implementations§
impl Freeze for OwnedApi
impl RefUnwindSafe for OwnedApi
impl Send for OwnedApi
impl Sync for OwnedApi
impl Unpin for OwnedApi
impl UnwindSafe for OwnedApi
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> 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
key and return true if they are equal.