pub struct WasiCtxBuilder { /* private fields */ }
Expand description

A builder allowing customizable construction of WasiCtx instances.

Implementations

Builder for a new WasiCtx.

Add arguments to the command-line arguments list.

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail.

Add an argument to the command-line arguments list.

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail.

Inherit the command-line arguments from the host process.

If any arguments from the host process contain invalid UTF-8, WasiCtxBuilder::build() will fail.

Inherit stdin from the host process.

Inherit stdout from the host process.

Inherit stderr from the host process.

Inherit the stdin, stdout, and stderr streams from the host process.

Inherit the environment variables from the host process.

If any environment variables from the host process contain invalid Unicode (UTF-16 for Windows, UTF-8 for other platforms), WasiCtxBuilder::build() will fail.

Add an entry to the environment.

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail.

Add entries to the environment.

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail.

Provide a Handle to use as stdin

Provide a Handle to use as stdout

Provide a Handle to use as stderr

Add a preopened directory.

Add a preopened virtual directory.

Build a WasiCtx, consuming this WasiCtxBuilder.

If any of the arguments or environment variables in this builder cannot be converted into CStrings, either due to NUL bytes or Unicode conversions, this will fail.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more