pub struct MemStash { /* private fields */ }Expand description
Hoard is an in-memory stash useful for WASM implementations.
Implementations§
Source§impl MemStash
impl MemStash
Sourcepub fn debug_schemata(
&self,
) -> &Confined<BTreeMap<SchemaId, Schema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
pub fn debug_schemata( &self, ) -> &Confined<BTreeMap<SchemaId, Schema>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
Method borrowing MemStash::schemata field.
Sourcepub fn debug_geneses(
&self,
) -> &Confined<BTreeMap<ContractId, Genesis>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
pub fn debug_geneses( &self, ) -> &Confined<BTreeMap<ContractId, Genesis>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Method borrowing MemStash::geneses field.
Sourcepub fn debug_bundles(
&self,
) -> &Confined<BTreeMap<BundleId, TransitionBundle>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
pub fn debug_bundles( &self, ) -> &Confined<BTreeMap<BundleId, TransitionBundle>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
Method borrowing MemStash::bundles field.
Sourcepub fn debug_witnesses(
&self,
) -> &Confined<BTreeMap<Txid, SealWitness>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
pub fn debug_witnesses( &self, ) -> &Confined<BTreeMap<Txid, SealWitness>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
Method borrowing MemStash::witnesses field.
Sourcepub fn debug_secret_seals(
&self,
) -> &Confined<BTreeSet<BlindSeal<TxPtr>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn debug_secret_seals( &self, ) -> &Confined<BTreeSet<BlindSeal<TxPtr>>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing MemStash::secret_seals field.
Sourcepub fn debug_type_system(&self) -> &TypeSystem
pub fn debug_type_system(&self) -> &TypeSystem
Method borrowing MemStash::type_system field.
Sourcepub fn debug_libs(
&self,
) -> &Confined<BTreeMap<LibId, Lib>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
pub fn debug_libs( &self, ) -> &Confined<BTreeMap<LibId, Lib>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Method borrowing MemStash::libs field.
Trait Implementations§
Source§impl CloneNoPersistence for MemStash
impl CloneNoPersistence for MemStash
fn clone_no_persistence(&self) -> MemStash
Source§impl PersistenceProvider<MemStash> for FsBinStore
impl PersistenceProvider<MemStash> for FsBinStore
Source§impl Persisting for MemStash
impl Persisting for MemStash
fn persistence(&self) -> Option<&Persistence<MemStash>>
fn persistence_mut(&mut self) -> Option<&mut Persistence<MemStash>>
fn as_mut_persistence(&mut self) -> &mut Option<Persistence<MemStash>>
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 StashReadProvider for MemStash
impl StashReadProvider for MemStash
Source§type Error = Infallible
type Error = Infallible
Error type which must indicate problems on data retrieval.
fn type_system( &self, ) -> Result<&TypeSystem, <MemStash as StashReadProvider>::Error>
fn lib( &self, id: LibId, ) -> Result<&Lib, ProviderError<<MemStash as StashReadProvider>::Error>>
fn schemata( &self, ) -> Result<impl Iterator<Item = &Schema>, <MemStash as StashReadProvider>::Error>
fn schema( &self, schema_id: SchemaId, ) -> Result<&Schema, ProviderError<<MemStash as StashReadProvider>::Error>>
fn geneses( &self, ) -> Result<impl Iterator<Item = &Genesis>, <MemStash as StashReadProvider>::Error>
fn genesis( &self, contract_id: ContractId, ) -> Result<&Genesis, ProviderError<<MemStash as StashReadProvider>::Error>>
fn witness_ids( &self, ) -> Result<impl Iterator<Item = Txid>, <MemStash as StashReadProvider>::Error>
fn bundle_ids( &self, ) -> Result<impl Iterator<Item = BundleId>, <MemStash as StashReadProvider>::Error>
fn bundle( &self, bundle_id: BundleId, ) -> Result<&TransitionBundle, ProviderError<<MemStash as StashReadProvider>::Error>>
fn witness( &self, witness_id: Txid, ) -> Result<&SealWitness, ProviderError<<MemStash as StashReadProvider>::Error>>
fn taprets( &self, ) -> Result<impl Iterator<Item = (Txid, TapretCommitment)>, <MemStash as StashReadProvider>::Error>
fn seal_secret( &self, secret: SecretSeal, ) -> Result<Option<BlindSeal<TxPtr>>, <MemStash as StashReadProvider>::Error>
fn secret_seals( &self, ) -> Result<impl Iterator<Item = BlindSeal<TxPtr>>, <MemStash as StashReadProvider>::Error>
fn contract_schema( &self, contract_id: ContractId, ) -> Result<&Schema, ProviderError<Self::Error>>
Source§impl StashWriteProvider for MemStash
impl StashWriteProvider for MemStash
type Error = MemError
fn replace_schema( &mut self, schema: Schema, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
fn replace_genesis( &mut self, genesis: Genesis, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
fn replace_bundle( &mut self, bundle: TransitionBundle, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
fn replace_witness( &mut self, witness: SealWitness, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
fn consume_types( &mut self, types: TypeSystem, ) -> Result<(), <MemStash as StashWriteProvider>::Error>
fn replace_lib( &mut self, lib: Lib, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
fn add_secret_seal( &mut self, seal: BlindSeal<TxPtr>, ) -> Result<bool, <MemStash as StashWriteProvider>::Error>
Source§impl StoreTransaction for MemStash
impl StoreTransaction for MemStash
type TransactionErr = MemError
fn begin_transaction( &mut self, ) -> Result<(), <MemStash as StoreTransaction>::TransactionErr>
fn commit_transaction( &mut self, ) -> Result<(), <MemStash as StoreTransaction>::TransactionErr>
fn rollback_transaction(&mut self)
Source§impl StrictDecode for MemStash
impl StrictDecode for MemStash
fn strict_decode(reader: &mut impl TypedRead) -> Result<MemStash, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for MemStash
impl StrictDeserialize for MemStash
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 MemStash
impl StrictDumb for MemStash
fn strict_dumb() -> MemStash
Source§impl StrictEncode for MemStash
impl StrictEncode for MemStash
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 MemStash
impl StrictSerialize for MemStash
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 MemStash
impl StrictStruct for MemStash
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for MemStash
impl StrictType for MemStash
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE
fn strict_name() -> Option<TypeName>
impl StashProvider for MemStash
impl StrictProduct for MemStash
Auto Trait Implementations§
impl Freeze for MemStash
impl !RefUnwindSafe for MemStash
impl Send for MemStash
impl Sync for MemStash
impl Unpin for MemStash
impl !UnwindSafe for MemStash
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