Struct ApiInner

Source
pub struct ApiInner<Vm: ApiVm> {
Show 13 fields pub version: ReservedBytes<2>, pub codex_id: CodexId, pub timestamp: i64, pub name: Option<TypeName>, pub developer: Identity, pub conforms: Option<TypeName>, pub default_call: Option<CallState>, pub reserved: ReservedBytes<8>, pub append_only: TinyOrdMap<StateName, AppendApi<Vm>>, pub destructible: TinyOrdMap<StateName, DestructibleApi<Vm>>, pub readers: TinyOrdMap<MethodName, Vm::Reader>, pub verifiers: TinyOrdMap<MethodName, CallId>, pub errors: TinyOrdMap<u256, TinyString>,
}

Fields§

§version: ReservedBytes<2>

Version of the API structure.

§codex_id: CodexId

Commitment to the codex under which the API is valid.

§timestamp: i64

Timestamp, which is used for versioning (later APIs have priority over new ones).

§name: Option<TypeName>

API name. Each codex must have a default API with no name.

§developer: Identity

Developer identity string.

§conforms: Option<TypeName>

Interface standard to which the API conforms.

§default_call: Option<CallState>

Name for the default API call and destructible state name.

§reserved: ReservedBytes<8>

Reserved for future use.

§append_only: TinyOrdMap<StateName, AppendApi<Vm>>

State API defines how a structured contract state is constructed out of (and converted into) UltraSONIC immutable memory cells.

§destructible: TinyOrdMap<StateName, DestructibleApi<Vm>>

State API defines how a structured contract state is constructed out of (and converted into) UltraSONIC destructible memory cells.

§readers: TinyOrdMap<MethodName, Vm::Reader>

Readers have access to the converted global state and can construct a derived state out of it.

The typical examples when readers are used are to sum individual asset issues and compute the number of totally issued assets.

§verifiers: TinyOrdMap<MethodName, CallId>

Links between named transaction methods defined in the interface - and corresponding verifier call ids defined by the contract.

NB: Multiple methods from the interface may call the came verifier.

§errors: TinyOrdMap<u256, TinyString>

Maps error type reported by a contract verifier via EA value to an error description taken from the interfaces.

Trait Implementations§

Source§

impl<Vm: Clone + ApiVm> Clone for ApiInner<Vm>
where Vm::Reader: Clone,

Source§

fn clone(&self) -> ApiInner<Vm>

Returns a copy 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<Vm: Debug + ApiVm> Debug for ApiInner<Vm>
where Vm::Reader: Debug,

Source§

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

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

impl<'de, Vm: ApiVm> Deserialize<'de> for ApiInner<Vm>

Source§

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 From<ApiInner<EmbeddedProc>> for Api

Source§

fn from(v: ApiInner<EmbeddedProc>) -> Self

Converts to this type from the input type.
Source§

impl From<ApiInner<Vm>> for Api

Source§

fn from(v: ApiInner<Vm>) -> Self

Converts to this type from the input type.
Source§

impl<Vm: ApiVm> Serialize for ApiInner<Vm>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Vm: ApiVm> StrictDecode for ApiInner<Vm>

Source§

fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>

Source§

fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>

Source§

impl<Vm: ApiVm> StrictDumb for ApiInner<Vm>

Source§

fn strict_dumb() -> Self

Source§

impl<Vm: ApiVm> StrictEncode for ApiInner<Vm>

Source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

Source§

fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>

Source§

impl<Vm: ApiVm> StrictStruct for ApiInner<Vm>

Source§

impl<Vm: ApiVm> StrictType for ApiInner<Vm>

Source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_SONIC

Source§

fn strict_name() -> Option<TypeName>

Source§

impl<Vm: ApiVm> StrictProduct for ApiInner<Vm>

Auto Trait Implementations§

§

impl<Vm> Freeze for ApiInner<Vm>

§

impl<Vm> RefUnwindSafe for ApiInner<Vm>

§

impl<Vm> Send for ApiInner<Vm>
where <Vm as ApiVm>::Reader: Send, <Vm as ApiVm>::Adaptor: Send, <Vm as ApiVm>::Arithm: Send,

§

impl<Vm> Sync for ApiInner<Vm>
where <Vm as ApiVm>::Reader: Sync, <Vm as ApiVm>::Adaptor: Sync, <Vm as ApiVm>::Arithm: Sync,

§

impl<Vm> Unpin for ApiInner<Vm>

§

impl<Vm> UnwindSafe for ApiInner<Vm>

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<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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,