pub struct Schema {
pub ffv: Ffv,
pub name: TypeName,
pub meta_types: Confined<BTreeMap<MetaType, MetaDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub global_types: Confined<BTreeMap<GlobalStateType, GlobalDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub owned_types: Confined<BTreeMap<AssignmentType, AssignmentDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub genesis: GenesisSchema,
pub transitions: Confined<BTreeMap<TransitionType, TransitionDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
pub default_assignment: Option<AssignmentType>,
}Fields§
§ffv: Ffv§name: TypeName§meta_types: Confined<BTreeMap<MetaType, MetaDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>§global_types: Confined<BTreeMap<GlobalStateType, GlobalDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>§owned_types: Confined<BTreeMap<AssignmentType, AssignmentDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>§genesis: GenesisSchema§transitions: Confined<BTreeMap<TransitionType, TransitionDetails>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>§default_assignment: Option<AssignmentType>Implementations§
Source§impl Schema
impl Schema
pub fn schema_id(&self) -> SchemaId
pub fn types(&self) -> impl Iterator<Item = SemId>
pub fn libs(&self) -> impl Iterator<Item = LibId>
pub fn default_transition_for_assignment( &self, assignment_type: &AssignmentType, ) -> TransitionType
pub fn assignment( &self, name: impl Into<FieldName>, ) -> (&AssignmentType, &AssignmentDetails)
pub fn assignment_type(&self, name: impl Into<FieldName>) -> AssignmentType
pub fn assignment_name(&self, type_id: AssignmentType) -> &FieldName
pub fn assignment_types_for_state( &self, state_type: StateType, ) -> Vec<&AssignmentType>
pub fn global( &self, name: impl Into<FieldName>, ) -> (&GlobalStateType, &GlobalDetails)
pub fn global_type(&self, name: impl Into<FieldName>) -> GlobalStateType
pub fn meta(&self, name: impl Into<FieldName>) -> (&MetaType, &MetaDetails)
pub fn meta_type(&self, name: impl Into<FieldName>) -> MetaType
pub fn meta_name(&self, type_id: MetaType) -> &FieldName
pub fn transition( &self, name: impl Into<FieldName>, ) -> (&TransitionType, &TransitionDetails)
pub fn transition_type(&self, name: impl Into<FieldName>) -> TransitionType
Source§impl Schema
impl Schema
pub fn verify(&self, types: &TypeSystem) -> Result<(), ValidationError>
Source§impl Schema
impl Schema
pub fn validate_state<'validator, S>(
&'validator self,
consignment_types: &'validator TypeSystem,
consignment_scripts: &'validator Confined<BTreeMap<LibId, Lib>, 0, rgbcore::::validation::consignment::Scripts::{constant#1}>,
genesis: &'validator Genesis,
op: OrdOpRef<'_>,
contract_state: Rc<RefCell<S>>,
prev_state: &'validator BTreeMap<AssignmentType, Vec<RevealedState>>,
) -> Result<(), ValidationError>where
S: ContractStateAccess + ContractStateEvolve,
Trait Implementations§
Source§impl CommitEncode for Schema
impl CommitEncode for Schema
Source§type CommitmentId = SchemaId
type CommitmentId = SchemaId
Type of the resulting commitment.
Source§fn commit_encode(&self, e: &mut CommitEngine)
fn commit_encode(&self, e: &mut CommitEngine)
Encodes the data for the commitment by writing them directly into a
std::io::Write writer instanceSource§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Schema
Source§impl Ord for Schema
impl Ord for Schema
1.21.0 (const: unstable) · 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 PartialOrd for Schema
impl PartialOrd for Schema
Source§impl Serialize for Schema
impl Serialize for Schema
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 Schema
impl StrictDecode for Schema
fn strict_decode(reader: &mut impl TypedRead) -> Result<Schema, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for Schema
impl StrictDeserialize for Schema
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 StrictDumb for Schema
impl StrictDumb for Schema
fn strict_dumb() -> Schema
Source§impl StrictEncode for Schema
impl StrictEncode for Schema
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
impl StrictProduct for Schema
Source§impl StrictSerialize for Schema
impl StrictSerialize for Schema
fn strict_serialized_len<const MAX: usize>(&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 StrictStruct for Schema
impl StrictStruct for Schema
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Schema
impl StrictType for Schema
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_COMMIT
fn strict_name() -> Option<TypeName>
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.