pub struct Schema<Root>where
Root: SchemaRoot,{
pub ffv: Ffv,
pub subset_of: Option<Root>,
pub global_types: Confined<BTreeMap<u16, GlobalStateSchema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub owned_types: Confined<BTreeMap<u16, StateSchema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub valency_types: Confined<BTreeSet<u16>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>,
pub genesis: GenesisSchema,
pub extensions: Confined<BTreeMap<u16, ExtensionSchema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub transitions: Confined<BTreeMap<u16, TransitionSchema>, 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>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§owned_types: Confined<BTreeMap<u16, StateSchema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§valency_types: Confined<BTreeSet<u16>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>
§genesis: GenesisSchema
§extensions: Confined<BTreeMap<u16, ExtensionSchema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
§transitions: Confined<BTreeMap<u16, TransitionSchema>, 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>(
&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§const PLATE_TITLE: &'static str = "RGB SCHEMA"
const PLATE_TITLE: &'static str = "RGB SCHEMA"
String used in ASCII armored blocks
type Id = SchemaId
fn bindle_id(&self) -> Self::Id
fn bindle_mnemonic(&self) -> Option<String>
fn bindle_headers(&self) -> BTreeMap<&'static str, String>
fn bindle(self) -> Bindle<Self>
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 for Schema<Root>where
Root: SchemaRoot,
impl<Root> PartialEq for Schema<Root>where
Root: SchemaRoot,
Source§impl<Root> PartialOrd for Schema<Root>where
Root: SchemaRoot,
impl<Root> PartialOrd for Schema<Root>where
Root: SchemaRoot,
Source§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>, 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>, 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]
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,
Auto Trait Implementations§
impl<Root> Freeze for Schema<Root>where
Root: Freeze,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.