Struct Transition

Source
pub struct Transition {
    pub ffv: Ffv,
    pub contract_id: ContractId,
    pub transition_type: u16,
    pub metadata: Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>,
    pub globals: GlobalState,
    pub inputs: Inputs,
    pub assignments: Assignments<BlindSeal<TxPtr>>,
    pub valencies: Valencies,
}

Fields§

§ffv: Ffv§contract_id: ContractId§transition_type: u16§metadata: Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>§globals: GlobalState§inputs: Inputs§assignments: Assignments<BlindSeal<TxPtr>>§valencies: Valencies

Implementations§

Source§

impl Transition

Source

pub fn prev_state(&self) -> &Inputs

Returns reference to information about the owned rights in form of Inputs wrapper structure which this operation updates with state transition (“parent owned rights”).

Trait Implementations§

Source§

impl Clone for Transition

Source§

fn clone(&self) -> Transition

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 Transition

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 Transition

Source§

const TAG: [u8; 32]

Source§

type Id = OpId

Type of the resulting commitment.
Source§

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

Performs commitment to client-side-validated data
Source§

impl Conceal for Transition

Source§

type Concealed = Transition

The resulting confidential type concealing original data.
Source§

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

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

impl Debug for Transition

Source§

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

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

impl<'de> Deserialize<'de> for Transition

Source§

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

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

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

Source§

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

Converts to this type from the input type.
Source§

impl Hash for Transition

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 Transition

Source§

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

Source§

impl Operation for Transition

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>, 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 Ord for Transition

Source§

fn cmp(&self, other: &Transition) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Transition

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Transition

Source§

fn partial_cmp(&self, other: &Transition) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Transition

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 Transition

Source§

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

Source§

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

Source§

impl StrictDeserialize for Transition

Source§

fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 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 Transition

Source§

impl StrictEncode for Transition

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 Transition

Source§

impl StrictStruct for Transition

Source§

impl StrictType for Transition

Source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB

Source§

fn strict_name() -> Option<TypeName>

Source§

impl Eq for Transition

Source§

impl StrictProduct for Transition

Source§

impl StructuralPartialEq for Transition

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

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

Source§

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

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

impl<Q, K> Equivalent<K> for Q
where 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 T
where 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 for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> VerifyEq for T
where 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 T
where T: for<'de> Deserialize<'de>,