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
Source§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 Freeze for Hoard
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