pub struct Schema<Root: SchemaRoot> {
pub ffv: Ffv,
pub subset_of: Option<Root>,
pub global_types: TinyOrdMap<GlobalStateType, GlobalStateSchema>,
pub owned_types: TinyOrdMap<AssignmentType, StateSchema>,
pub valency_types: TinyOrdSet<ValencyType>,
pub genesis: GenesisSchema,
pub extensions: TinyOrdMap<ExtensionType, ExtensionSchema>,
pub transitions: TinyOrdMap<TransitionType, TransitionSchema>,
pub type_system: TypeSystem,
pub script: Script,
}
Fields§
§ffv: Ffv
§subset_of: Option<Root>
§global_types: TinyOrdMap<GlobalStateType, GlobalStateSchema>
§owned_types: TinyOrdMap<AssignmentType, StateSchema>
§valency_types: TinyOrdSet<ValencyType>
§genesis: GenesisSchema
§extensions: TinyOrdMap<ExtensionType, ExtensionSchema>
§transitions: TinyOrdMap<TransitionType, TransitionSchema>
§type_system: TypeSystem
Type system
script: Script
Validation code.
Implementations§
source§impl<Root: SchemaRoot> Schema<Root>
impl<Root: SchemaRoot> Schema<Root>
pub fn schema_id(&self) -> SchemaId
pub fn blank_transition(&self) -> TransitionSchema
source§impl<Root: SchemaRoot> Schema<Root>
impl<Root: SchemaRoot> Schema<Root>
pub fn validate<C: ConsignmentApi>( &self, consignment: &C, op: OpRef<'_>, vm: &dyn VirtualMachine ) -> Status
Trait Implementations§
source§impl<Root: SchemaRoot> CommitStrategy for Schema<Root>
impl<Root: SchemaRoot> CommitStrategy for Schema<Root>
source§impl<Root: SchemaRoot> CommitmentId for Schema<Root>
impl<Root: SchemaRoot> CommitmentId for Schema<Root>
source§impl<'de, Root> Deserialize<'de> for Schema<Root>where
Root: Deserialize<'de> + SchemaRoot,
impl<'de, Root> Deserialize<'de> for Schema<Root>where
Root: Deserialize<'de> + SchemaRoot,
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<Root: SchemaRoot> Ord for Schema<Root>
impl<Root: SchemaRoot> Ord for Schema<Root>
source§impl<Root: SchemaRoot> PartialEq for Schema<Root>
impl<Root: SchemaRoot> PartialEq for Schema<Root>
source§impl<Root: SchemaRoot> PartialOrd for Schema<Root>
impl<Root: SchemaRoot> PartialOrd for Schema<Root>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<Root: SchemaRoot> StrictDecode for Schema<Root>
impl<Root: SchemaRoot> StrictDecode for Schema<Root>
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl<Root: SchemaRoot> StrictDeserialize for Schema<Root>
impl<Root: SchemaRoot> StrictDeserialize for Schema<Root>
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX> ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path> ) -> Result<Self, DeserializeError>
source§impl<Root: SchemaRoot> StrictEncode for Schema<Root>
impl<Root: SchemaRoot> StrictEncode for Schema<Root>
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl<Root: SchemaRoot> StrictSerialize for Schema<Root>
impl<Root: SchemaRoot> StrictSerialize for Schema<Root>
fn strict_serialized_len(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path> ) -> Result<(), SerializeError>
source§impl<Root: SchemaRoot> StrictStruct for Schema<Root>
impl<Root: SchemaRoot> StrictStruct for Schema<Root>
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl<Root: SchemaRoot> StrictType for Schema<Root>
impl<Root: SchemaRoot> StrictType for Schema<Root>
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl<Root: Eq + SchemaRoot> Eq for Schema<Root>
impl<Root: SchemaRoot> StrictProduct for Schema<Root>
impl<Root: SchemaRoot> StructuralEq for Schema<Root>
Auto Trait Implementations§
impl<Root> RefUnwindSafe for Schema<Root>where
Root: RefUnwindSafe,
impl<Root> Send for Schema<Root>where
Root: Send,
impl<Root> Sync for Schema<Root>where
Root: Sync,
impl<Root> Unpin for Schema<Root>where
Root: Unpin,
impl<Root> UnwindSafe for Schema<Root>where
Root: UnwindSafe,
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.