pub enum OpRef<'op> {
Genesis(&'op Genesis),
Transition(&'op Transition),
Extension(&'op Extension),
}
Variants§
Trait Implementations§
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<'op> Operation for OpRef<'op>
impl<'op> Operation for OpRef<'op>
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>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}> ⓘ
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
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<'op>
fn assignments_by_type(&self, t: u16) -> Option<TypedAssigns<BlindSeal<TxPtr>>>
impl<'op> Copy for OpRef<'op>
impl<'op> Eq for OpRef<'op>
impl<'op> StructuralPartialEq for OpRef<'op>
Auto Trait Implementations§
impl<'op> Freeze for OpRef<'op>
impl<'op> RefUnwindSafe for OpRef<'op>
impl<'op> Send for OpRef<'op>
impl<'op> Sync for OpRef<'op>
impl<'op> Unpin for OpRef<'op>
impl<'op> UnwindSafe for OpRef<'op>
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> 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.