pub struct ContractHistory { /* private fields */ }
Expand description
Contract history accumulates raw data from the contract history, extracted from a series of consignments over the time. It does consensus ordering of the state data, but it doesn’t interpret or validates the state against the schema.
To access the valid contract state use [Contract
] APIs.
Implementations§
Source§impl ContractHistory
impl ContractHistory
Sourcepub fn schema_id(&self) -> SchemaId
pub fn schema_id(&self) -> SchemaId
Method returning copy of ContractHistory::schema_id
field.
Sourcepub fn root_schema_id(&self) -> Option<SchemaId>
pub fn root_schema_id(&self) -> Option<SchemaId>
Method returning copy of ContractHistory::root_schema_id
field.
Sourcepub fn contract_id(&self) -> ContractId
pub fn contract_id(&self) -> ContractId
Method returning copy of ContractHistory::contract_id
field.
Sourcepub fn rights(
&self,
) -> &Confined<BTreeSet<OutputAssignment<VoidState>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn rights( &self, ) -> &Confined<BTreeSet<OutputAssignment<VoidState>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing ContractHistory::rights
field.
Sourcepub fn fungibles(
&self,
) -> &Confined<BTreeSet<OutputAssignment<RevealedValue>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn fungibles( &self, ) -> &Confined<BTreeSet<OutputAssignment<RevealedValue>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing ContractHistory::fungibles
field.
Sourcepub fn data(
&self,
) -> &Confined<BTreeSet<OutputAssignment<RevealedData>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn data( &self, ) -> &Confined<BTreeSet<OutputAssignment<RevealedData>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing ContractHistory::data
field.
Sourcepub fn attach(
&self,
) -> &Confined<BTreeSet<OutputAssignment<RevealedAttach>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn attach( &self, ) -> &Confined<BTreeSet<OutputAssignment<RevealedAttach>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing ContractHistory::attach
field.
Source§impl ContractHistory
impl ContractHistory
Sourcepub fn with(
schema_id: SchemaId,
root_schema_id: Option<SchemaId>,
contract_id: ContractId,
genesis: &Genesis,
) -> ContractHistory
pub fn with( schema_id: SchemaId, root_schema_id: Option<SchemaId>, contract_id: ContractId, genesis: &Genesis, ) -> ContractHistory
§Panics
If genesis violates RGB consensus rules and wasn’t checked against the schema before adding to the history.
Sourcepub fn update_genesis(&mut self, genesis: &Genesis)
pub fn update_genesis(&mut self, genesis: &Genesis)
§Panics
If genesis violates RGB consensus rules and wasn’t checked against the schema before adding to the history.
Sourcepub fn add_transition(
&mut self,
transition: &Transition,
ord_txid: WitnessAnchor,
)
pub fn add_transition( &mut self, transition: &Transition, ord_txid: WitnessAnchor, )
§Panics
If state transition violates RGB consensus rules and wasn’t checked against the schema before adding to the history.
Sourcepub fn add_extension(&mut self, extension: &Extension, ord_txid: WitnessAnchor)
pub fn add_extension(&mut self, extension: &Extension, ord_txid: WitnessAnchor)
§Panics
If state extension violates RGB consensus rules and wasn’t checked against the schema before adding to the history.
Trait Implementations§
Source§impl Clone for ContractHistory
impl Clone for ContractHistory
Source§fn clone(&self) -> ContractHistory
fn clone(&self) -> ContractHistory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ContractHistory
impl Debug for ContractHistory
Source§impl<'de> Deserialize<'de> for ContractHistory
impl<'de> Deserialize<'de> for ContractHistory
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContractHistory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContractHistory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ContractHistory
impl PartialEq for ContractHistory
Source§impl Serialize for ContractHistory
impl Serialize for ContractHistory
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,
Source§impl StrictDecode for ContractHistory
impl StrictDecode for ContractHistory
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<ContractHistory, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDumb for ContractHistory
impl StrictDumb for ContractHistory
fn strict_dumb() -> ContractHistory
Source§impl StrictEncode for ContractHistory
impl StrictEncode for ContractHistory
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 StrictStruct for ContractHistory
impl StrictStruct for ContractHistory
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for ContractHistory
impl StrictType for ContractHistory
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
impl Eq for ContractHistory
impl StrictProduct for ContractHistory
impl StructuralPartialEq for ContractHistory
Auto Trait Implementations§
impl Freeze for ContractHistory
impl RefUnwindSafe for ContractHistory
impl Send for ContractHistory
impl Sync for ContractHistory
impl Unpin for ContractHistory
impl UnwindSafe for ContractHistory
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
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
key
and return true
if they are equal.