pub struct MemIndex { /* private fields */ }Implementations§
Source§impl MemIndex
impl MemIndex
Sourcepub 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}>
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.
Sourcepub fn debug_op_bundle_index(
&self,
) -> &Confined<BTreeMap<OpId, BundleId>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
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.
Sourcepub fn debug_bundle_contract_index(
&self,
) -> &Confined<BTreeMap<BundleId, ContractId>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
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.
Sourcepub 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}>
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.
Sourcepub fn debug_contract_index(
&self,
) -> &Confined<BTreeMap<ContractId, ContractIndex>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
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.
Sourcepub 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}>
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.
Trait Implementations§
Source§impl CloneNoPersistence for MemIndex
impl CloneNoPersistence for MemIndex
fn clone_no_persistence(&self) -> MemIndex
Source§impl IndexReadProvider for MemIndex
impl IndexReadProvider for MemIndex
type Error = Infallible
fn contracts_assigning( &self, outpoints: BTreeSet<OutPoint>, ) -> Result<impl Iterator<Item = ContractId>, <MemIndex as IndexReadProvider>::Error>
fn public_opouts( &self, contract_id: ContractId, ) -> Result<BTreeSet<Opout>, IndexReadError<<MemIndex as IndexReadProvider>::Error>>
fn opouts_by_outputs( &self, contract_id: ContractId, outpoints: impl IntoIterator<Item = impl Into<OutPoint>>, ) -> Result<BTreeSet<Opout>, IndexReadError<<MemIndex as IndexReadProvider>::Error>>
fn opouts_by_terminals( &self, terminals: impl IntoIterator<Item = SecretSeal>, ) -> Result<BTreeSet<Opout>, <MemIndex as IndexReadProvider>::Error>
fn bundle_id_for_op( &self, opid: OpId, ) -> Result<BundleId, IndexReadError<<MemIndex as IndexReadProvider>::Error>>
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>>
fn bundle_info( &self, bundle_id: BundleId, ) -> Result<(impl Iterator<Item = Txid>, ContractId), IndexReadError<<MemIndex as IndexReadProvider>::Error>>
Source§impl IndexWriteProvider for MemIndex
impl IndexWriteProvider for MemIndex
type Error = MemError
fn register_contract( &mut self, contract_id: ContractId, ) -> Result<bool, <MemIndex as IndexWriteProvider>::Error>
fn register_bundle( &mut self, bundle_id: BundleId, witness_id: Txid, contract_id: ContractId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>
fn register_operation( &mut self, opid: OpId, bundle_id: BundleId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>
fn register_spending( &mut self, opid: OpId, bundle_id: BundleId, ) -> Result<bool, IndexWriteError<<MemIndex as IndexWriteProvider>::Error>>
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,
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
impl PersistenceProvider<MemIndex> for FsBinStore
Source§impl Persisting for MemIndex
impl Persisting for MemIndex
fn persistence(&self) -> Option<&Persistence<MemIndex>>
fn persistence_mut(&mut self) -> Option<&mut Persistence<MemIndex>>
fn as_mut_persistence(&mut self) -> &mut Option<Persistence<MemIndex>>
fn load( provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<Self, PersistenceError>
fn is_persisted(&self) -> bool
fn is_dirty(&self) -> bool
fn mark_dirty(&mut self)
fn is_autosave(&self) -> bool
fn set_autosave(&mut self)
Source§fn make_persistent(
&mut self,
provider: impl PersistenceProvider<Self> + 'static,
autosave: bool,
) -> Result<bool, PersistenceError>
fn make_persistent( &mut self, provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<bool, PersistenceError>
Returns whether the object was persisting before this method.
fn store(&mut self) -> Result<(), PersistenceError>
Source§impl StoreTransaction for MemIndex
impl StoreTransaction for MemIndex
type TransactionErr = MemError
fn begin_transaction( &mut self, ) -> Result<(), <MemIndex as StoreTransaction>::TransactionErr>
fn commit_transaction( &mut self, ) -> Result<(), <MemIndex as StoreTransaction>::TransactionErr>
fn rollback_transaction(&mut self)
Source§impl StrictDecode for MemIndex
impl StrictDecode for MemIndex
fn strict_decode(reader: &mut impl TypedRead) -> Result<MemIndex, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for MemIndex
impl StrictDeserialize for MemIndex
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 MemIndex
impl StrictDumb for MemIndex
fn strict_dumb() -> MemIndex
Source§impl StrictEncode for MemIndex
impl StrictEncode for MemIndex
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSerialize for MemIndex
impl StrictSerialize for MemIndex
fn strict_serialized_len<const MAX: usize>(&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 MemIndex
impl StrictStruct for MemIndex
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for MemIndex
impl StrictType for MemIndex
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE
fn strict_name() -> Option<TypeName>
impl IndexProvider for MemIndex
impl StrictProduct for MemIndex
Auto Trait Implementations§
impl Freeze for MemIndex
impl !RefUnwindSafe for MemIndex
impl Send for MemIndex
impl Sync for MemIndex
impl Unpin for MemIndex
impl !UnwindSafe for MemIndex
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