Struct wasi_process::WasiProcess [−][src]
A wasi process. See crate documentation for more details and examples.
Fields
stdin: Option<WasiStdin>An stdin reader for the wasi process
stdout: Option<WasiStdout>An stdout writer for the wasi process
stderr: Option<WasiStderr>An stderr writer for the wasi process
Implementations
impl WasiProcess[src]
pub fn new(
instance: &Instance,
buf_size: MaxBufSize
) -> Result<Self, ExportError>[src]
instance: &Instance,
buf_size: MaxBufSize
) -> Result<Self, ExportError>
Create a WasiProcess from a wasm instance. See the crate documentation for more details.
Returns an error if the instance doesn’t have a _start function exported.
pub fn with_function(start_function: Function, buf_size: MaxBufSize) -> Self[src]
Create a WasiProcess from a wasm instance, given a _start function. See the crate
documentation for more details.
pub fn spawn(self) -> SpawnHandleⓘNotable traits for SpawnHandle
impl Future for SpawnHandle type Output = Result<(), SpawnError>;[src]
Notable traits for SpawnHandle
impl Future for SpawnHandle type Output = Result<(), SpawnError>;Spawn the process on a tokio task. It’s okay to let this drop; that just means that you don’t care about exactly when or how the process finishes, and you’ll know you’re done when an stdio stream closes;
Trait Implementations
impl Future for WasiProcess[src]
Auto Trait Implementations
impl !RefUnwindSafe for WasiProcess
impl Send for WasiProcess
impl Sync for WasiProcess
impl Unpin for WasiProcess
impl !UnwindSafe for WasiProcess
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<F> IntoFuture for F where
F: Future, [src]
F: Future,
type Output = <F as Future>::Output
into_future)The output that the future will produce on completion.
type Future = F
into_future)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future[src]
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,