Trait mz_dyncfg::ConfigType

source ·
pub trait ConfigType: Into<ConfigVal> + Clone + Sized {
    // Required method
    fn from_val(val: ConfigVal) -> Self;
}
Expand description

A type usable as a Config.

Required Methods§

source

fn from_val(val: ConfigVal) -> Self

Converts a type-erased enum value to this type.

Panics if the enum’s variant does not match this type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConfigType for Value

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for Option<usize>

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for bool

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for u32

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for usize

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for String

source§

fn from_val(val: ConfigVal) -> Self

source§

impl ConfigType for Duration

source§

fn from_val(val: ConfigVal) -> Self

Implementors§