MemState

Struct MemState 

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

Implementations§

Source§

impl MemState

Source

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.

Source

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.

Source

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.

Source§

impl MemState

Trait Implementations§

Source§

impl CloneNoPersistence for MemState

Source§

impl Debug for MemState

Source§

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

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

impl PersistenceProvider<MemState> for FsBinStore

Source§

impl Persisting for MemState

Source§

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

Source§

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

Source§

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

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 StateReadProvider for MemState

Source§

type ContractRead<'a> = MemContract<&'a MemContractState>

Source§

type Error = StateInconsistency

Source§

fn contract_state( &self, contract_id: ContractId, ) -> Result<<MemState as StateReadProvider>::ContractRead<'_>, <MemState as StateReadProvider>::Error>

Source§

fn witnesses( &self, ) -> Confined<BTreeMap<Txid, WitnessOrd>, amplify::::collection::confinement::LargeOrdMap::{constant#0}, amplify::::collection::confinement::LargeOrdMap::{constant#1}>

Source§

fn invalid_bundles( &self, ) -> Confined<BTreeSet<BundleId>, amplify::::collection::confinement::LargeOrdSet::{constant#0}, amplify::::collection::confinement::LargeOrdSet::{constant#1}>

Source§

impl StateWriteProvider for MemState

Source§

type ContractWrite<'a> = MemContractWriter<'a>

Source§

type Error = MemError

Source§

fn register_contract( &mut self, schema: &Schema, genesis: &Genesis, ) -> Result<<MemState as StateWriteProvider>::ContractWrite<'_>, <MemState as StateWriteProvider>::Error>

Source§

fn update_contract( &mut self, contract_id: ContractId, ) -> Result<Option<<MemState as StateWriteProvider>::ContractWrite<'_>>, <MemState as StateWriteProvider>::Error>

Source§

fn upsert_witness( &mut self, witness_id: Txid, witness_ord: WitnessOrd, ) -> Result<(), <MemState as StateWriteProvider>::Error>

Source§

fn update_bundle( &mut self, bundle_id: BundleId, valid: bool, ) -> Result<(), <MemState as StateWriteProvider>::Error>

Source§

impl StoreTransaction for MemState

Source§

impl StrictDecode for MemState

Source§

impl StrictDeserialize for MemState

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 MemState

Source§

impl StrictEncode for MemState

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 MemState

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 MemState

Source§

impl StrictType for MemState

Source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STORAGE

Source§

fn strict_name() -> Option<TypeName>

Source§

impl StateProvider for MemState

Source§

impl StrictProduct for MemState

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