pub struct Schema<Root>where
Root: SchemaRoot,{
pub ffv: Ffv,
pub subset_of: Option<Root>,
pub global_types: Confined<BTreeMap<u16, GlobalStateSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub owned_types: Confined<BTreeMap<u16, StateSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub valency_types: Confined<BTreeSet<u16, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>,
pub genesis: GenesisSchema,
pub extensions: Confined<BTreeMap<u16, ExtensionSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub transitions: Confined<BTreeMap<u16, TransitionSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub type_system: TypeSystem,
pub script: Script,
}
Fields§
§ffv: Ffv
§subset_of: Option<Root>
§global_types: Confined<BTreeMap<u16, GlobalStateSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§owned_types: Confined<BTreeMap<u16, StateSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§valency_types: Confined<BTreeSet<u16, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>
§genesis: GenesisSchema
§extensions: Confined<BTreeMap<u16, ExtensionSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§transitions: Confined<BTreeMap<u16, TransitionSchema, Global>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§type_system: TypeSystem
Type system
script: Script
Validation code.
Implementations§
source§impl<Root> Schema<Root>where
Root: SchemaRoot,
impl<Root> Schema<Root>where Root: SchemaRoot,
pub fn schema_id(&self) -> SchemaId
pub fn blank_transition(&self) -> TransitionSchema
source§impl<Root> Schema<Root>where
Root: SchemaRoot,
impl<Root> Schema<Root>where Root: SchemaRoot,
pub fn validate<C, 'script>( &self, consignment: &C, op: OpRef<'_>, vm: &dyn VirtualMachine ) -> Statuswhere C: ConsignmentApi,
Trait Implementations§
source§impl<Root: SchemaRoot> BindleContent for Schema<Root>
impl<Root: SchemaRoot> BindleContent for Schema<Root>
source§impl<Root> CommitStrategy for Schema<Root>where
Root: SchemaRoot,
impl<Root> CommitStrategy for Schema<Root>where Root: SchemaRoot,
source§impl<Root> CommitmentId for Schema<Root>where
Root: SchemaRoot,
impl<Root> CommitmentId for Schema<Root>where Root: SchemaRoot,
source§impl<'de, Root> Deserialize<'de> for Schema<Root>where
Root: SchemaRoot + Deserialize<'de>,
impl<'de, Root> Deserialize<'de> for Schema<Root>where Root: SchemaRoot + Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Schema<Root>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Schema<Root>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<Root> Ord for Schema<Root>where
Root: SchemaRoot,
impl<Root> Ord for Schema<Root>where Root: SchemaRoot,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Root> PartialEq<Schema<Root>> for Schema<Root>where
Root: SchemaRoot,
impl<Root> PartialEq<Schema<Root>> for Schema<Root>where Root: SchemaRoot,
source§impl<Root> PartialOrd<Schema<Root>> for Schema<Root>where
Root: SchemaRoot,
impl<Root> PartialOrd<Schema<Root>> for Schema<Root>where Root: SchemaRoot,
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> Serialize for Schema<Root>where
Root: SchemaRoot + Serialize,
impl<Root> Serialize for Schema<Root>where Root: SchemaRoot + Serialize,
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<Root> StrictDecode for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictDecode for Schema<Root>where Root: SchemaRoot,
fn strict_decode( reader: &mut impl TypedRead ) -> Result<Schema<Root>, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl<Root> StrictDeserialize for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictDeserialize for Schema<Root>where Root: SchemaRoot,
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8, Global>, 0, MAX> ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path> ) -> Result<Self, DeserializeError>
source§impl<Root> StrictEncode for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictEncode for Schema<Root>where Root: SchemaRoot,
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<Root> StrictSerialize for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictSerialize for Schema<Root>where Root: SchemaRoot,
fn strict_serialized_len(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self ) -> Result<Confined<Vec<u8, Global>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path> ) -> Result<(), SerializeError>
source§impl<Root> StrictStruct for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictStruct for Schema<Root>where Root: SchemaRoot,
const ALL_FIELDS: &'static [&'static str] = &["ffv", "subsetOf", "globalTypes", "ownedTypes", "valencyTypes", "genesis", "extensions", "transitions", "typeSystem", "script"]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl<Root> StrictType for Schema<Root>where
Root: SchemaRoot,
impl<Root> StrictType for Schema<Root>where Root: SchemaRoot,
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl<Root> Eq for Schema<Root>where Root: Eq + SchemaRoot,
impl SchemaRoot for Schema<()>
impl<Root> StrictProduct for Schema<Root>where Root: SchemaRoot,
impl<Root> StructuralEq for Schema<Root>where Root: SchemaRoot,
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.