pub struct Extension {
pub ffv: Ffv,
pub contract_id: ContractId,
pub extension_type: u16,
pub metadata: Confined<Vec<u8, Global>, 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, Global>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>§globals: GlobalState§assignments: Assignments<BlindSeal<Txid>>§redeemed: Redeemed§valencies: ValenciesImplementations§
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, 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 PartialEq<Extension> for Extension
impl PartialEq<Extension> for Extension
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, 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 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, Global>, 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] = &["ffv", "contractId", "extensionType", "metadata", "globals", "assignments", "redeemed", "valencies"]
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 StructuralEq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
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
§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.