Struct rgbstd::persistence::hoard::Hoard

source ·
pub struct Hoard { /* private fields */ }
Expand description

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

Implementations§

source§

impl Hoard

source

pub fn preset() -> Self

source

pub fn consume_consignment<const TYPE: bool>( &mut self, consignment: Consignment<TYPE> ) -> Result<(), ConsumeError>

source

pub fn consume_bundle( &mut self, bundle: TransitionBundle ) -> Result<(), ConsumeError>

source

pub fn consume_anchor( &mut self, anchor: Anchor<MerkleBlock> ) -> Result<(), ConsumeError>

Trait Implementations§

source§

impl Clone for Hoard

source§

fn clone(&self) -> Hoard

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hoard

source§

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

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

impl Stash for Hoard

§

type Error = Infallible

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

fn ifaces(&self) -> Result<BTreeMap<IfaceId, TypeName>, Self::Error>

source§

fn iface_by_name( &self, name: &TypeName ) -> Result<&Iface, StashError<Self::Error>>

source§

fn iface_by_id(&self, id: IfaceId) -> Result<&Iface, StashError<Self::Error>>

source§

fn schema_ids(&self) -> Result<BTreeSet<SchemaId>, Self::Error>

source§

fn schema( &self, schema_id: SchemaId ) -> Result<&SchemaIfaces, StashError<Self::Error>>

source§

fn contract_ids_by_iface( &self, name: &TypeName ) -> Result<BTreeSet<ContractId>, Self::Error>

source§

fn contract_ids(&self) -> Result<BTreeSet<ContractId>, Self::Error>

source§

fn contract_suppl( &self, contract_id: ContractId ) -> Option<&TinyOrdSet<ContractSuppl>>

source§

fn genesis( &self, contract_id: ContractId ) -> Result<&Genesis, StashError<Self::Error>>

source§

fn bundle_ids(&self) -> Result<BTreeSet<BundleId>, Self::Error>

source§

fn bundle( &self, bundle_id: BundleId ) -> Result<&TransitionBundle, StashError<Self::Error>>

source§

fn extension_ids(&self) -> Result<BTreeSet<OpId>, Self::Error>

source§

fn extension(&self, op_id: OpId) -> Result<&Extension, StashError<Self::Error>>

source§

fn anchor_ids(&self) -> Result<BTreeSet<AnchorId>, Self::Error>

source§

fn anchor( &self, anchor_id: AnchorId ) -> Result<&Anchor<MerkleBlock>, StashError<Self::Error>>

source§

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

source§

impl StrictDecode for Hoard

source§

fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>

source§

fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>

source§

impl StrictDumb for Hoard

source§

fn strict_dumb() -> Self

source§

impl StrictEncode for Hoard

source§

fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>

source§

fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>

source§

impl StrictStruct for Hoard

source§

impl StrictType for Hoard

source§

const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STD

source§

fn strict_name() -> Option<TypeName>

source§

impl StrictProduct for Hoard

Auto Trait Implementations§

§

impl RefUnwindSafe for Hoard

§

impl Send for Hoard

§

impl Sync for Hoard

§

impl Unpin for Hoard

§

impl UnwindSafe for Hoard

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V