pub struct HostState { /* private fields */ }Expand description
Default host state implementation
Provides basic WASI support, users can extend through inheritance or composition
Implementations§
Source§impl HostState
impl HostState
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a new host state with no inherited capabilities
The returned state has no stdio, network, or filesystem access by default.
Use HostState::with_wasi or HostState::default if you need
to customise WASI capabilities explicitly.
Trait Implementations§
Source§impl HostStateImpl for HostState
impl HostStateImpl for HostState
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Get user-defined state
Auto Trait Implementations§
impl !RefUnwindSafe for HostState
impl !Sync for HostState
impl !UnwindSafe for HostState
impl Freeze for HostState
impl Send for HostState
impl Unpin for HostState
impl UnsafeUnpin for HostState
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more