MemIndex

Struct MemIndex 

Source
pub struct MemIndex { /* private fields */ }

Implementations§

Source§

impl MemIndex

Source

pub fn debug_op_bundle_children_index( &self, ) -> &Confined<BTreeMap<OpId, Confined<BTreeSet<BundleId>, amplify::::collection::confinement::SmallOrdSet::{constant#0}, amplify::::collection::confinement::SmallOrdSet::{constant#1}>>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Method borrowing MemIndex::op_bundle_children_index field.

Source

pub fn debug_op_bundle_index( &self, ) -> &Confined<BTreeMap<OpId, BundleId>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Method borrowing MemIndex::op_bundle_index field.

Source

pub fn debug_bundle_contract_index( &self, ) -> &Confined<BTreeMap<BundleId, ContractId>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Method borrowing MemIndex::bundle_contract_index field.

Source

pub fn debug_bundle_witness_index( &self, ) -> &Confined<BTreeMap<BundleId, Confined<BTreeSet<Txid>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Method borrowing MemIndex::bundle_witness_index field.

Source

pub fn debug_contract_index( &self, ) -> &Confined<BTreeMap<ContractId, ContractIndex>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>

Method borrowing MemIndex::contract_index field.

Source

pub fn debug_terminal_index( &self, ) -> &Confined<BTreeMap<SecretSeal, Confined<BTreeSet<Opout>, amplify::::collection::confinement::MediumOrdSet::{constant#0}, amplify::::collection::confinement::MediumOrdSet::{constant#1}>>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Method borrowing MemIndex::terminal_index field.

Source§

impl MemIndex

Trait Implementations§

Source§

impl CloneNoPersistence for MemIndex

Source§

impl Debug for MemIndex

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl IndexReadProvider for MemIndex

Source§

type Error = Infallible

Source§

fn contracts_assigning( &self, outpoints: BTreeSet<OutPoint>, ) -> Result<impl Iterator<Item = ContractId>, <MemIndex as IndexReadProvider>::Error>

Source§

fn public_opouts( &self, contract_id: ContractId, ) -> Result<BTreeSet<Opout>, IndexReadError<<MemIndex as IndexReadProvider>::Error>>

Source§

fn opouts_by_outputs( &self, contract_id: ContractId, outpoints: impl IntoIterator<Item = impl Into<OutPoint>>, ) -> Result<BTreeSet<Opout>, IndexReadError<<MemIndex as IndexReadProvider>::Error>>

Source§

fn opouts_by_terminals( &self, terminals: impl IntoIterator<Item = SecretSeal>, ) -> Result<BTreeSet<Opout>, <MemIndex as IndexReadProvider>::Error>

Source§

fn bundle_id_for_op( &self, opid: OpId, ) -> Result<BundleId, IndexReadError<<MemIndex as IndexReadProvider>::Error>>

Source§

fn bundle_ids_children_of_op( &self, opid: OpId, ) -> Result<Confined<BTreeSet<BundleId>, amplify::::collection::confinement::SmallOrdSet::{constant#0}, amplify::::collection::confinement::SmallOrdSet::{constant#1}>, IndexReadError<<MemIndex as IndexReadProvider>::Error>>

Source§

fn bundle_info( &self, bundle_id: BundleId, ) -> Result<(impl Iterator<Item = Txid>, ContractId), IndexReadError<<MemIndex as IndexReadProvider>::Error>>

Source§

impl IndexWriteProvider for MemIndex

Source§

type Error = MemError

Source§

fn register_contract( &mut self, contract_id: ContractId, ) -> Result<bool, <MemIndex as IndexWriteProvider>::Error>

Source§

fn register_bundle( &mut self, bundle_id: BundleId, witness_id: Txid, contract_id: ContractId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>

Source§

fn register_operation( &mut self, opid: OpId, bundle_id: BundleId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>

Source§

fn register_spending( &mut self, opid: OpId, bundle_id: BundleId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>

Source§

fn index_genesis_assignments<State>( &mut self, contract_id: ContractId, vec: &[Assign<State, BlindSeal<Txid>>], opid: OpId, type_id: AssignmentType, ) -> Result<(), IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>
where State: ExposedState,

Source§

fn index_transition_assignments<State>( &mut self, contract_id: ContractId, vec: &[Assign<State, BlindSeal<TxPtr>>], opid: OpId, type_id: AssignmentType, witness_id: Txid, ) -> Result<(), IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>
where State: ExposedState,

Source§

impl PersistenceProvider<MemIndex> for FsBinStore

Source§

impl Persisting for MemIndex

Source§

fn persistence(&self) -> Option<&Persistence<MemIndex>>

Source§

fn persistence_mut(&mut self) -> Option<&mut Persistence<MemIndex>>

Source§

fn as_mut_persistence(&mut self) -> &mut Option<Persistence<MemIndex>>

Source§

fn load( provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<Self, PersistenceError>

Source§

fn is_persisted(&self) -> bool

Source§

fn is_dirty(&self) -> bool

Source§

fn mark_dirty(&mut self)

Source§

fn is_autosave(&self) -> bool

Source§

fn set_autosave(&mut self)

Source§

fn make_persistent( &mut self, provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<bool, PersistenceError>

Returns whether the object was persisting before this method.
Source§

fn store(&mut self) -> Result<(), PersistenceError>

Source§

impl StoreTransaction for MemIndex

Source§

impl StrictDecode for MemIndex

Source§

impl StrictDeserialize for MemIndex

Source§

fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>

Source§

fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>

Source§

impl StrictDumb for MemIndex

Source§

impl StrictEncode for MemIndex

Source§

fn strict_encode<W>(&self, writer: W) -> Result<W, Error>
where W: TypedWrite,

Source§

fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>

Source§

impl StrictSerialize for MemIndex

Source§

fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>

Source§

fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>

Source§

fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>

Source§

impl StrictStruct for MemIndex

Source§

impl StrictType for MemIndex

Source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE

Source§

fn strict_name() -> Option<TypeName>

Source§

impl IndexProvider for MemIndex

Source§

impl StrictProduct for MemIndex

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V