Struct rgbstd::contract::Transition
source · pub struct Transition {
pub ffv: Ffv,
pub contract_id: ContractId,
pub transition_type: u16,
pub metadata: Confined<Vec<u8, Global>, 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, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>§globals: GlobalState§inputs: Inputs§assignments: Assignments<BlindSeal<TxPtr>>§valencies: ValenciesImplementations§
source§impl Transition
impl Transition
sourcepub fn prev_state(&self) -> &Inputs
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
impl Clone for Transition
source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl CommitEncode for Transition
impl CommitEncode for Transition
source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write writer instancesource§impl CommitmentId for Transition
impl CommitmentId for Transition
source§impl Conceal for Transition
impl Conceal for Transition
§type Concealed = Transition
type Concealed = Transition
The resulting confidential type concealing original data.
source§impl Debug for Transition
impl Debug for Transition
source§impl<'de> Deserialize<'de> for Transition
impl<'de> Deserialize<'de> for Transition
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Transition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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>
impl<'op> From<&'op Transition> for OpRef<'op>
source§fn from(v: &'op Transition) -> OpRef<'op>
fn from(v: &'op Transition) -> OpRef<'op>
Converts to this type from the input type.
source§impl Hash for Transition
impl Hash for Transition
source§impl MergeReveal for Transition
impl MergeReveal for Transition
fn merge_reveal(self, other: Self) -> Result<Self, MergeRevealError>
source§impl Operation for Transition
impl Operation for Transition
source§fn op_type(&self) -> OpType
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
fn full_type(&self) -> OpFullType
Returns full contract operation type information
source§fn contract_id(&self) -> ContractId
fn contract_id(&self) -> ContractId
Returns
ContractId this operation belongs to.source§fn transition_type(&self) -> Option<u16>
fn transition_type(&self) -> Option<u16>
Returns
Option::Some(TransitionType) for transitions or
Option::None for genesis and extension operation typessource§fn extension_type(&self) -> Option<u16>
fn extension_type(&self) -> Option<u16>
Returns
Option::Some(ExtensionType) for extension nodes or
Option::None for genesis and state transitionssource§fn metadata(
&self
) -> &Confined<Vec<u8, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}> ⓘ
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
fn globals(&self) -> &GlobalState
Returns reference to a full set of metadata (in form of
GlobalState
wrapper structure) for the contract operation.fn valencies(&self) -> &Valencies
fn assignments(&self) -> AssignmentsRef<'_>
fn assignments_by_type(&self, t: u16) -> Option<TypedAssigns<BlindSeal<TxPtr>>>
source§impl Ord for Transition
impl Ord for Transition
source§fn cmp(&self, other: &Transition) -> Ordering
fn cmp(&self, other: &Transition) -> Ordering
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 PartialEq<Transition> for Transition
impl PartialEq<Transition> for Transition
source§fn eq(&self, other: &Transition) -> bool
fn eq(&self, other: &Transition) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<Transition> for Transition
impl PartialOrd<Transition> for Transition
source§fn partial_cmp(&self, other: &Transition) -> Option<Ordering>
fn partial_cmp(&self, other: &Transition) -> Option<Ordering>
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 Serialize for Transition
impl Serialize for Transition
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 Transition
impl StrictDecode for Transition
fn strict_decode(reader: &mut impl TypedRead) -> Result<Transition, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDeserialize for Transition
impl StrictDeserialize for Transition
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 StrictDumb for Transition
impl StrictDumb for Transition
fn strict_dumb() -> Transition
source§impl StrictEncode for Transition
impl StrictEncode for Transition
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 StrictSerialize for Transition
impl StrictSerialize for Transition
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 StrictStruct for Transition
impl StrictStruct for Transition
const ALL_FIELDS: &'static [&'static str] = &["ffv", "contractId", "transitionType", "metadata", "globals", "inputs", "assignments", "valencies"]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for Transition
impl StrictType for Transition
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl Eq for Transition
impl StrictProduct for Transition
impl StructuralEq for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnwindSafe for Transition
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<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,
§fn equivalent(&self, key: &K) -> bool
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,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
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,
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.