pub enum Api {
Embedded(ApiInner<EmbeddedProc>),
Alu(ApiInner<Vm>),
}Variants§
Implementations§
Source§impl Api
impl Api
pub fn api_id(&self) -> ApiId
pub fn vm_type(&self) -> VmType
pub fn codex_id(&self) -> CodexId
pub fn timestamp(&self) -> i64
pub fn name(&self) -> Option<&TypeName>
pub fn developer(&self) -> &Identity
pub fn default_call(&self) -> Option<&CallState>
pub fn verifier(&self, method: impl Into<MethodName>) -> Option<CallId>
pub fn readers(&self) -> Box<dyn Iterator<Item = &MethodName> + '_>
pub fn read<'s, I: IntoIterator<Item = &'s StateAtom>>( &self, name: &StateName, state: impl Fn(&StateName) -> I, ) -> StrictVal
pub fn convert_immutable( &self, data: &StateData, sys: &TypeSystem, ) -> Option<(StateName, StateAtom)>
pub fn convert_destructible( &self, value: StateValue, sys: &TypeSystem, ) -> Option<(StateName, StrictVal)>
pub fn build_immutable( &self, name: impl Into<StateName>, data: StrictVal, raw: Option<StrictVal>, sys: &TypeSystem, ) -> StateData
pub fn build_destructible( &self, name: impl Into<StateName>, data: StrictVal, sys: &TypeSystem, ) -> StateValue
pub fn calculate(&self, name: impl Into<StateName>) -> Box<dyn StateCalc>
Trait Implementations§
Source§impl CommitEncode for Api
impl CommitEncode for Api
Source§type CommitmentId = ApiId
type CommitmentId = ApiId
Type of the resulting commitment.
Source§fn commit_encode(&self, engine: &mut CommitEngine)
fn commit_encode(&self, engine: &mut CommitEngine)
Encodes the data for the commitment by writing them directly into a
std::io::Write writer instanceSource§impl<'de> Deserialize<'de> for Api
impl<'de> Deserialize<'de> for Api
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 From<ApiInner<EmbeddedProc>> for Api
impl From<ApiInner<EmbeddedProc>> for Api
Source§fn from(v: ApiInner<EmbeddedProc>) -> Self
fn from(v: ApiInner<EmbeddedProc>) -> Self
Converts to this type from the input type.
Source§impl Ord for Api
impl Ord for Api
Source§impl PartialOrd for Api
impl PartialOrd for Api
Source§impl StrictDecode for Api
impl StrictDecode for Api
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for Api
impl StrictDumb for Api
fn strict_dumb() -> Self
Source§impl StrictEncode for Api
impl StrictEncode for Api
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSum for Api
impl StrictSum for Api
const ALL_VARIANTS: &'static [(u8, &'static str)]
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<VariantName>
fn variant_ord(&self) -> u8
Source§impl StrictType for Api
impl StrictType for Api
const STRICT_LIB_NAME: &'static str = LIB_NAME_SONIC
fn strict_name() -> Option<TypeName>
Source§impl StrictUnion for Api
impl StrictUnion for Api
fn strict_type_info() -> TypeInfo<Self>
impl Eq for Api
Auto Trait Implementations§
impl Freeze for Api
impl RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl UnwindSafe for Api
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<T> CommitId for Twhere
T: CommitEncode,
impl<T> CommitId for Twhere
T: CommitEncode,
fn commit(&self) -> CommitEngine
Source§fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
Performs commitment to client-side-validated data
Source§impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
fn commitment_layout() -> CommitLayout
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.