Struct oasis_runtime_sdk::storage::HostStore
source · pub struct HostStore { /* private fields */ }
Expand description
A store for a specific state root that talks to the runtime host.
Implementations§
source§impl HostStore
impl HostStore
sourcepub fn new(host: Arc<Protocol>, root: Root) -> Self
pub fn new(host: Arc<Protocol>, root: Root) -> Self
Create a new host store for the given host and root.
sourcepub async fn new_for_round(
host: Arc<Protocol>,
consensus_verifier: &Arc<dyn Verifier>,
id: Namespace,
round: u64,
) -> Result<Self>
pub async fn new_for_round( host: Arc<Protocol>, consensus_verifier: &Arc<dyn Verifier>, id: Namespace, round: u64, ) -> Result<Self>
Create a new host store for the given host and root at the given round.
The corresponding root hash is fetched by looking it up in consensus layer state, verified by the passed verifier to be correct.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HostStore
impl !RefUnwindSafe for HostStore
impl Send for HostStore
impl !Sync for HostStore
impl Unpin for HostStore
impl !UnwindSafe for HostStore
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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