pub trait Operation {
// Required methods
fn op_type(&self) -> OpType;
fn full_type(&self) -> OpFullType;
fn id(&self) -> OpId;
fn contract_id(&self) -> ContractId;
fn transition_type(&self) -> Option<u16>;
fn extension_type(&self) -> Option<u16>;
fn metadata(
&self
) -> &Confined<Vec<u8, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}> ⓘ;
fn globals(&self) -> &GlobalState;
fn valencies(
&self
) -> &Confined<BTreeSet<u16, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>;
fn assignments(&self) -> AssignmentsRef<'_>;
fn assignments_by_type(
&self,
t: u16
) -> Option<TypedAssigns<BlindSeal<TxPtr>>>;
fn inputs(
&self
) -> Confined<BTreeSet<Input, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>;
}Expand description
Required Methods§
sourcefn 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)
sourcefn full_type(&self) -> OpFullType
fn full_type(&self) -> OpFullType
Returns full contract operation type information
sourcefn contract_id(&self) -> ContractId
fn contract_id(&self) -> ContractId
Returns ContractId this operation belongs to.
sourcefn 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 types
sourcefn 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 transitions
sourcefn 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.
sourcefn 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 ) -> &Confined<BTreeSet<u16, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>
fn assignments(&self) -> AssignmentsRef<'_>
fn assignments_by_type(&self, t: u16) -> Option<TypedAssigns<BlindSeal<TxPtr>>>
sourcefn inputs(
&self
) -> Confined<BTreeSet<Input, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>
fn inputs( &self ) -> Confined<BTreeSet<Input, Global>, amplify::::collection::confinement::TinyOrdSet::{constant#0}, amplify::::collection::confinement::TinyOrdSet::{constant#1}>
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.