Skip to main content

WasmtimeOption

Trait WasmtimeOption 

Source
pub trait WasmtimeOption:
    Sized
    + Send
    + Sync
    + Clone
    + 'static {
    const OPTIONS: &'static [OptionDesc<Self>];
    const ENV_PREFIX: &'static str;

    // Provided methods
    fn parse_env() -> Result<Vec<Self>> { ... }
    fn parse_csv(val: &str) -> Result<Vec<Self>> { ... }
}
Expand description

Helper trait used by CommaSeparated which contains a list of all options supported by the option group.

Required Associated Constants§

Source

const OPTIONS: &'static [OptionDesc<Self>]

Source

const ENV_PREFIX: &'static str

Provided Methods§

Source

fn parse_env() -> Result<Vec<Self>>

Parse all environment variables that relate to this option, returning all parsed variables as a list.

Returns an error if any environment variable has invalid syntax and/or failed to parse.

Source

fn parse_csv(val: &str) -> Result<Vec<Self>>

Parses val as a comma-separated list of values for Self::OPTIONS.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§