Struct rgbstd::contract::Genesis

source ·
pub struct Genesis {
    pub ffv: Ffv,
    pub schema_id: SchemaId,
    pub chain: Chain,
    pub metadata: Confined<Vec<u8, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>,
    pub globals: GlobalState,
    pub assignments: Assignments<BlindSeal<Txid>>,
    pub valencies: Valencies,
}

Fields§

§ffv: Ffv§schema_id: SchemaId§chain: Chain§metadata: Confined<Vec<u8, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>§globals: GlobalState§assignments: Assignments<BlindSeal<Txid>>§valencies: Valencies

Trait Implementations§

source§

impl Clone for Genesis

source§

fn clone(&self) -> Genesis

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CommitEncode for Genesis

source§

fn commit_encode(&self, e: &mut impl Write)

Encodes the data for the commitment by writing them directly into a io::Write writer instance
source§

impl CommitmentId for Genesis

source§

const TAG: [u8; 32] = *b"urn:lnpbp:rgb:genesis:v02#202304"

§

type Id = ContractId

Type of the resulting commitment.
source§

fn commitment_id(&self) -> Self::Id

Performs commitment to client-side-validated data
source§

impl Conceal for Genesis

§

type Concealed = Genesis

The resulting confidential type concealing original data.
source§

fn conceal(&self) -> <Genesis as Conceal>::Concealed

Performs conceal procedure returning confidential data concealing original data.
source§

impl Debug for Genesis

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Genesis

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Genesis, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'op> From<&'op Genesis> for OpRef<'op>

source§

fn from(v: &'op Genesis) -> OpRef<'op>

Converts to this type from the input type.
source§

impl Hash for Genesis

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl MergeReveal for Genesis

source§

fn merge_reveal(self, other: Self) -> Result<Self, MergeRevealError>

source§

impl Operation for Genesis

source§

fn op_type(&self) -> OpType

Returns type of the operation (see OpType). Unfortunately, this can’t be just a const, since it will break our ability to convert concrete Node types into &dyn Node (entities implementing traits with const definitions can’t be made into objects)
source§

fn full_type(&self) -> OpFullType

Returns full contract operation type information
source§

fn id(&self) -> OpId

Returns OpId, which is a hash of this operation commitment serialization
source§

fn contract_id(&self) -> ContractId

Returns ContractId this operation belongs to.
source§

fn transition_type(&self) -> Option<u16>

Returns Option::Some(TransitionType) for transitions or Option::None for genesis and extension operation types
source§

fn extension_type(&self) -> Option<u16>

Returns Option::Some(ExtensionType) for extension nodes or Option::None for genesis and state transitions
source§

fn metadata( &self ) -> &Confined<Vec<u8, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>

Returns metadata associated with the operation, if any.
source§

fn globals(&self) -> &GlobalState

Returns reference to a full set of metadata (in form of GlobalState wrapper structure) for the contract operation.
source§

fn valencies(&self) -> &Valencies

source§

fn assignments(&self) -> AssignmentsRef<'_>

source§

fn assignments_by_type(&self, t: u16) -> Option<TypedAssigns<BlindSeal<TxPtr>>>

source§

fn inputs(&self) -> Inputs

For genesis and public state extensions always returns an empty list. While public state extension do have parent nodes, they do not contain indexed rights.
source§

impl PartialEq<Genesis> for Genesis

source§

fn eq(&self, other: &Genesis) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Genesis

source§

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 Genesis

source§

fn strict_decode(reader: &mut impl TypedRead) -> Result<Genesis, DecodeError>

source§

fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>

source§

impl StrictDeserialize for Genesis

source§

fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8, Global>, 0, MAX> ) -> Result<Self, DeserializeError>

source§

fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path> ) -> Result<Self, DeserializeError>

source§

impl StrictDumb for Genesis

source§

impl StrictEncode for Genesis

source§

fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where W: TypedWrite,

source§

fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>

source§

impl StrictSerialize for Genesis

source§

impl StrictStruct for Genesis

source§

const ALL_FIELDS: &'static [&'static str] = &["ffv", "schemaId", "chain", "metadata", "globals", "assignments", "valencies"]

source§

fn strict_check_fields()

source§

fn strict_type_info() -> TypeInfo<Self>

source§

impl StrictType for Genesis

source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB

source§

fn strict_name() -> Option<TypeName>

source§

impl Eq for Genesis

source§

impl StrictProduct for Genesis

source§

impl StructuralEq for Genesis

source§

impl StructuralPartialEq for Genesis

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> VerifyEq for Twhere T: Eq,

source§

fn verify_eq(&self, other: &T) -> bool

Verifies commit-equivalence of two instances of the same type.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,