pub struct WasiCtxBuilder { /* private fields */ }
Available on crate feature
sync
only.Implementations§
Source§impl WasiCtxBuilder
impl WasiCtxBuilder
pub fn new() -> Self
pub fn env( &mut self, var: &str, value: &str, ) -> Result<&mut Self, StringArrayError>
pub fn envs( &mut self, env: &[(String, String)], ) -> Result<&mut Self, StringArrayError>
pub fn inherit_env(&mut self) -> Result<&mut Self, StringArrayError>
pub fn arg(&mut self, arg: &str) -> Result<&mut Self, StringArrayError>
pub fn args(&mut self, arg: &[String]) -> Result<&mut Self, StringArrayError>
pub fn inherit_args(&mut self) -> Result<&mut Self, StringArrayError>
pub fn stdin(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn stdout(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn stderr(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn inherit_stdin(&mut self) -> &mut Self
pub fn inherit_stdout(&mut self) -> &mut Self
pub fn inherit_stderr(&mut self) -> &mut Self
pub fn inherit_stdio(&mut self) -> &mut Self
pub fn preopened_dir( &mut self, dir: Dir, guest_path: impl AsRef<Path>, ) -> Result<&mut Self, Error>
pub fn preopened_socket( &mut self, fd: u32, socket: impl Into<Socket>, ) -> Result<&mut Self, Error>
pub fn build(&mut self) -> WasiCtx
Auto Trait Implementations§
impl Freeze for WasiCtxBuilder
impl !RefUnwindSafe for WasiCtxBuilder
impl Send for WasiCtxBuilder
impl Sync for WasiCtxBuilder
impl Unpin for WasiCtxBuilder
impl !UnwindSafe for WasiCtxBuilder
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
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