pub struct MemState { /* private fields */ }Implementations§
Source§impl MemState
impl MemState
Sourcepub fn debug_witnesses(
&self,
) -> &Confined<BTreeMap<Txid, WitnessOrd>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
pub fn debug_witnesses( &self, ) -> &Confined<BTreeMap<Txid, WitnessOrd>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
Method borrowing MemState::witnesses field.
Sourcepub fn debug_invalid_bundles(
&self,
) -> &Confined<BTreeSet<BundleId>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
pub fn debug_invalid_bundles( &self, ) -> &Confined<BTreeSet<BundleId>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Method borrowing MemState::invalid_bundles field.
Sourcepub fn debug_contracts(
&self,
) -> &Confined<BTreeMap<ContractId, MemContractState>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
pub fn debug_contracts( &self, ) -> &Confined<BTreeMap<ContractId, MemContractState>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Method borrowing MemState::contracts field.
Trait Implementations§
Source§impl CloneNoPersistence for MemState
impl CloneNoPersistence for MemState
fn clone_no_persistence(&self) -> MemState
Source§impl PersistenceProvider<MemState> for FsBinStore
impl PersistenceProvider<MemState> for FsBinStore
Source§impl Persisting for MemState
impl Persisting for MemState
fn persistence(&self) -> Option<&Persistence<MemState>>
fn persistence_mut(&mut self) -> Option<&mut Persistence<MemState>>
fn as_mut_persistence(&mut self) -> &mut Option<Persistence<MemState>>
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 StateReadProvider for MemState
impl StateReadProvider for MemState
type ContractRead<'a> = MemContract<&'a MemContractState>
type Error = StateInconsistency
fn contract_state( &self, contract_id: ContractId, ) -> Result<<MemState as StateReadProvider>::ContractRead<'_>, <MemState as StateReadProvider>::Error>
fn witnesses( &self, ) -> Confined<BTreeMap<Txid, WitnessOrd>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>
fn invalid_bundles( &self, ) -> Confined<BTreeSet<BundleId>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>
Source§impl StateWriteProvider for MemState
impl StateWriteProvider for MemState
type ContractWrite<'a> = MemContractWriter<'a>
type Error = MemError
fn register_contract( &mut self, schema: &Schema, genesis: &Genesis, ) -> Result<<MemState as StateWriteProvider>::ContractWrite<'_>, <MemState as StateWriteProvider>::Error>
fn update_contract( &mut self, contract_id: ContractId, ) -> Result<Option<<MemState as StateWriteProvider>::ContractWrite<'_>>, <MemState as StateWriteProvider>::Error>
fn upsert_witness( &mut self, witness_id: Txid, witness_ord: WitnessOrd, ) -> Result<(), <MemState as StateWriteProvider>::Error>
fn update_bundle( &mut self, bundle_id: BundleId, valid: bool, ) -> Result<(), <MemState as StateWriteProvider>::Error>
Source§impl StoreTransaction for MemState
impl StoreTransaction for MemState
type TransactionErr = MemError
fn begin_transaction( &mut self, ) -> Result<(), <MemState as StoreTransaction>::TransactionErr>
fn commit_transaction( &mut self, ) -> Result<(), <MemState as StoreTransaction>::TransactionErr>
fn rollback_transaction(&mut self)
Source§impl StrictDecode for MemState
impl StrictDecode for MemState
fn strict_decode(reader: &mut impl TypedRead) -> Result<MemState, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for MemState
impl StrictDeserialize for MemState
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 MemState
impl StrictDumb for MemState
fn strict_dumb() -> MemState
Source§impl StrictEncode for MemState
impl StrictEncode for MemState
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 MemState
impl StrictSerialize for MemState
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 MemState
impl StrictStruct for MemState
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for MemState
impl StrictType for MemState
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE
fn strict_name() -> Option<TypeName>
impl StateProvider for MemState
impl StrictProduct for MemState
Auto Trait Implementations§
impl Freeze for MemState
impl !RefUnwindSafe for MemState
impl Send for MemState
impl Sync for MemState
impl Unpin for MemState
impl !UnwindSafe for MemState
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