pub struct HostStorage;Expand description
Storage backend that delegates to WASM host imports.
This is a zero-sized type that forwards all storage operations to the TruthLinked runtime via host function calls. Used when contracts execute on-chain.
§Example
ⓘ
use truthlinked_sdk::backend::{HostStorage, StorageBackend};
let storage = HostStorage;
let value = storage.read_32(&slot)?;Trait Implementations§
Source§impl Clone for HostStorage
impl Clone for HostStorage
Source§fn clone(&self) -> HostStorage
fn clone(&self) -> HostStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HostStorage
impl Debug for HostStorage
Source§impl Default for HostStorage
impl Default for HostStorage
Source§fn default() -> HostStorage
fn default() -> HostStorage
Returns the “default value” for a type. Read more
Source§impl StorageBackend for HostStorage
impl StorageBackend for HostStorage
impl Copy for HostStorage
Auto Trait Implementations§
impl Freeze for HostStorage
impl RefUnwindSafe for HostStorage
impl Send for HostStorage
impl Sync for HostStorage
impl Unpin for HostStorage
impl UnsafeUnpin for HostStorage
impl UnwindSafe for HostStorage
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