pub enum StateSchema {
Declarative,
Fungible(FungibleType),
Structured(SemId),
Attachment(MediaType),
}
Variants§
Implementations§
Source§impl StateSchema
impl StateSchema
pub fn state_type(&self) -> StateType
Source§impl StateSchema
impl StateSchema
pub fn validate<State, Seal>(
&self,
type_system: &TypeSystem,
opid: &OpId,
state_type: u16,
data: &Assign<State, Seal>,
) -> Statuswhere
State: ExposedState,
Seal: ExposedSeal,
Trait Implementations§
Source§impl Clone for StateSchema
impl Clone for StateSchema
Source§fn clone(&self) -> StateSchema
fn clone(&self) -> StateSchema
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 Debug for StateSchema
impl Debug for StateSchema
Source§impl<'de> Deserialize<'de> for StateSchema
impl<'de> Deserialize<'de> for StateSchema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateSchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateSchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StateSchema
impl PartialEq for StateSchema
Source§impl Serialize for StateSchema
impl Serialize for StateSchema
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for StateSchema
impl StrictDecode for StateSchema
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<StateSchema, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDumb for StateSchema
impl StrictDumb for StateSchema
fn strict_dumb() -> StateSchema
Source§impl StrictEncode for StateSchema
impl StrictEncode for StateSchema
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl StrictSum for StateSchema
impl StrictSum for StateSchema
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<FieldName>
fn variant_ord(&self) -> u8
Source§impl StrictType for StateSchema
impl StrictType for StateSchema
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
Source§impl StrictUnion for StateSchema
impl StrictUnion for StateSchema
fn strict_type_info() -> TypeInfo<Self>
impl Copy for StateSchema
impl Eq for StateSchema
impl StructuralPartialEq for StateSchema
Auto Trait Implementations§
impl Freeze for StateSchema
impl RefUnwindSafe for StateSchema
impl Send for StateSchema
impl Sync for StateSchema
impl Unpin for StateSchema
impl UnwindSafe for StateSchema
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> 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.