pub trait WasmtimeOptionValue: Sized {
    const VAL_HELP: &'static str;

    // Required method
    fn parse(val: Option<&str>) -> Result<Self>;
}
Expand description

A helper trait for all types of options that can be parsed. This is what actually parses the =val in key=val

Required Associated Constants§

source

const VAL_HELP: &'static str

Help text for the value to be specified.

Required Methods§

source

fn parse(val: Option<&str>) -> Result<Self>

Parses the provided value, if given, returning an error on failure.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WasmtimeOptionValue for OptLevel

source§

const VAL_HELP: &'static str = "=0|1|2|s"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for Strategy

source§

const VAL_HELP: &'static str = "=winch|cranelift"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for bool

source§

const VAL_HELP: &'static str = "[=y|n]"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for u32

source§

const VAL_HELP: &'static str = "=N"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for u64

source§

const VAL_HELP: &'static str = "=N"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for usize

source§

const VAL_HELP: &'static str = "=N"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for String

source§

const VAL_HELP: &'static str = "=val"

source§

fn parse(val: Option<&str>) -> Result<Self>

source§

impl WasmtimeOptionValue for Duration

source§

const VAL_HELP: &'static str = "=N|Ns|Nms|.."

source§

fn parse(val: Option<&str>) -> Result<Duration>

Implementors§

source§

impl WasmtimeOptionValue for WasiNnGraph

source§

const VAL_HELP: &'static str = "=<format>::<dir>"