MemStash

Struct MemStash 

Source
pub struct MemStash { /* private fields */ }
Expand description

Hoard is an in-memory stash useful for WASM implementations.

Implementations§

Source§

impl MemStash

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn debug_type_system(&self) -> &TypeSystem

Method borrowing MemStash::type_system field.

Source

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.

Source§

impl MemStash

Trait Implementations§

Source§

impl CloneNoPersistence for MemStash

Source§

impl Debug for MemStash

Source§

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

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

impl PersistenceProvider<MemStash> for FsBinStore

Source§

impl Persisting for MemStash

Source§

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

Source§

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

Source§

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

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 StashReadProvider for MemStash

Source§

type Error = Infallible

Error type which must indicate problems on data retrieval.
Source§

fn type_system( &self, ) -> Result<&TypeSystem, <MemStash as StashReadProvider>::Error>

Source§

fn lib( &self, id: LibId, ) -> Result<&Lib, ProviderError<<MemStash as StashReadProvider>::Error>>

Source§

fn schemata( &self, ) -> Result<impl Iterator<Item = &Schema>, <MemStash as StashReadProvider>::Error>

Source§

fn schema( &self, schema_id: SchemaId, ) -> Result<&Schema, ProviderError<<MemStash as StashReadProvider>::Error>>

Source§

fn geneses( &self, ) -> Result<impl Iterator<Item = &Genesis>, <MemStash as StashReadProvider>::Error>

Source§

fn genesis( &self, contract_id: ContractId, ) -> Result<&Genesis, ProviderError<<MemStash as StashReadProvider>::Error>>

Source§

fn witness_ids( &self, ) -> Result<impl Iterator<Item = Txid>, <MemStash as StashReadProvider>::Error>

Source§

fn bundle_ids( &self, ) -> Result<impl Iterator<Item = BundleId>, <MemStash as StashReadProvider>::Error>

Source§

fn bundle( &self, bundle_id: BundleId, ) -> Result<&TransitionBundle, ProviderError<<MemStash as StashReadProvider>::Error>>

Source§

fn witness( &self, witness_id: Txid, ) -> Result<&SealWitness, ProviderError<<MemStash as StashReadProvider>::Error>>

Source§

fn taprets( &self, ) -> Result<impl Iterator<Item = (Txid, TapretCommitment)>, <MemStash as StashReadProvider>::Error>

Source§

fn seal_secret( &self, secret: SecretSeal, ) -> Result<Option<BlindSeal<TxPtr>>, <MemStash as StashReadProvider>::Error>

Source§

fn secret_seals( &self, ) -> Result<impl Iterator<Item = BlindSeal<TxPtr>>, <MemStash as StashReadProvider>::Error>

Source§

fn contract_schema( &self, contract_id: ContractId, ) -> Result<&Schema, ProviderError<Self::Error>>

Source§

impl StashWriteProvider for MemStash

Source§

impl StoreTransaction for MemStash

Source§

impl StrictDecode for MemStash

Source§

impl StrictDeserialize for MemStash

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 MemStash

Source§

impl StrictEncode for MemStash

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 MemStash

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 MemStash

Source§

impl StrictType for MemStash

Source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE

Source§

fn strict_name() -> Option<TypeName>

Source§

impl StashProvider for MemStash

Source§

impl StrictProduct for MemStash

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