FromKey

Trait FromKey 

Source
pub trait FromKey: Copy {
    // Required method
    fn try_from_key(key: Key) -> Option<Self>;
}
Expand description

FromKey Convert a stored Key into a concrete type. Returns None if the key cannot represent this type.

Required Methods§

Source

fn try_from_key(key: Key) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromKey for i8

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for i16

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for i32

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for i64

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for u8

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for u16

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for u32

Source§

fn try_from_key(key: Key) -> Option<Self>

Source§

impl FromKey for u64

Source§

fn try_from_key(key: Key) -> Option<Self>

Implementors§