pub struct Extension {
pub ffv: Ffv,
pub contract_id: ContractId,
pub extension_type: u16,
pub metadata: Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>,
pub globals: GlobalState,
pub assignments: Assignments<BlindSeal<Txid>>,
pub redeemed: Redeemed,
pub valencies: Valencies,
}
Fields§
§ffv: Ffv
§contract_id: ContractId
§extension_type: u16
§metadata: Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>
§globals: GlobalState
§assignments: Assignments<BlindSeal<Txid>>
§redeemed: Redeemed
§valencies: Valencies
Implementations§
Source§impl Extension
impl Extension
Sourcepub fn redeemed(&self) -> &Redeemed
pub fn redeemed(&self) -> &Redeemed
Returns reference to information about the public rights (in form of
Redeemed
wrapper structure), defined with “parent” state
extensions (i.e. those finalized with the current state transition) or
referenced by another state extension, which this operation updates
(“parent public rights”).
Trait Implementations§
Source§impl CommitEncode for Extension
impl CommitEncode for Extension
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 Extension
impl CommitmentId for Extension
Source§impl<'de> Deserialize<'de> for Extension
impl<'de> Deserialize<'de> for Extension
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Extension, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Extension, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MergeReveal for Extension
impl MergeReveal for Extension
fn merge_reveal(self, other: Self) -> Result<Self, MergeRevealError>
Source§impl Operation for Extension
impl Operation for Extension
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<'_>
fn assignments_by_type(&self, t: u16) -> Option<TypedAssigns<BlindSeal<TxPtr>>>
Source§impl Serialize for Extension
impl Serialize for Extension
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 Extension
impl StrictDecode for Extension
fn strict_decode(reader: &mut impl TypedRead) -> Result<Extension, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for Extension
impl StrictDeserialize for Extension
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for Extension
impl StrictDumb for Extension
fn strict_dumb() -> Extension
Source§impl StrictEncode for Extension
impl StrictEncode for Extension
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 Extension
impl StrictSerialize for Extension
fn strict_serialized_len(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictStruct for Extension
impl StrictStruct for Extension
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Extension
impl StrictType for Extension
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl Eq for Extension
impl StrictProduct for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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.