Skip to main content

FromKeyValue

Trait FromKeyValue 

Source
pub trait FromKeyValue: Sized {
    // Required method
    fn from_key_value(text: &str) -> Option<Self>;
}
Expand description

Types that can be parsed from a KeyValue string. Enums accept the member name or its numeric value.

Required Methods§

Source

fn from_key_value(text: &str) -> Option<Self>

Parses text, or None if it isn’t a valid value.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FromKeyValue for bool

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for f32

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for i32

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for i64

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for u8

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for u16

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for u32

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for u64

Source§

fn from_key_value(text: &str) -> Option<Self>

Source§

impl FromKeyValue for usize

Source§

fn from_key_value(text: &str) -> Option<Self>

Implementors§