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
impl Hoard
pub fn preset() -> Self
pub fn consume_consignment<const TYPE: bool>( &mut self, consignment: Consignment<TYPE> ) -> Result<(), ConsumeError>
pub fn consume_bundle( &mut self, bundle: TransitionBundle ) -> Result<(), ConsumeError>
pub fn consume_anchor( &mut self, anchor: Anchor<MerkleBlock> ) -> Result<(), ConsumeError>
Trait Implementations§
source§impl Stash for Hoard
impl Stash for Hoard
§type Error = Infallible
type Error = Infallible
Error type which must indicate problems on data retrieval.
fn ifaces(&self) -> Result<BTreeMap<IfaceId, TypeName>, Self::Error>
fn iface_by_name( &self, name: &TypeName ) -> Result<&Iface, StashError<Self::Error>>
fn iface_by_id(&self, id: IfaceId) -> Result<&Iface, StashError<Self::Error>>
fn schema_ids(&self) -> Result<BTreeSet<SchemaId>, Self::Error>
fn schema( &self, schema_id: SchemaId ) -> Result<&SchemaIfaces, StashError<Self::Error>>
fn contract_ids_by_iface( &self, name: &TypeName ) -> Result<BTreeSet<ContractId>, Self::Error>
fn contract_ids(&self) -> Result<BTreeSet<ContractId>, Self::Error>
fn contract_suppl( &self, contract_id: ContractId ) -> Option<&TinyOrdSet<ContractSuppl>>
fn genesis( &self, contract_id: ContractId ) -> Result<&Genesis, StashError<Self::Error>>
fn bundle_ids(&self) -> Result<BTreeSet<BundleId>, Self::Error>
fn bundle( &self, bundle_id: BundleId ) -> Result<&TransitionBundle, StashError<Self::Error>>
fn extension_ids(&self) -> Result<BTreeSet<OpId>, Self::Error>
fn extension(&self, op_id: OpId) -> Result<&Extension, StashError<Self::Error>>
fn anchor_ids(&self) -> Result<BTreeSet<AnchorId>, Self::Error>
fn anchor( &self, anchor_id: AnchorId ) -> Result<&Anchor<MerkleBlock>, StashError<Self::Error>>
fn contract_schema( &self, contract_id: ContractId ) -> Result<&SchemaIfaces, StashError<Self::Error>>
source§impl StrictDecode for Hoard
impl StrictDecode for Hoard
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDumb for Hoard
impl StrictDumb for Hoard
fn strict_dumb() -> Self
source§impl StrictEncode for Hoard
impl StrictEncode for Hoard
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictStruct for Hoard
impl StrictStruct for Hoard
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for Hoard
impl StrictType for Hoard
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STD
fn strict_name() -> Option<TypeName>
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> 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