Skip to main content

ToKey

Trait ToKey 

Source
pub trait ToKey {
    // Required method
    fn to_key(&self) -> Key<'_>;
}
Expand description

A type that can be converted into a Key.

Required Methods§

Source

fn to_key(&self) -> Key<'_>

Perform the conversion.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ToKey for String

Source§

fn to_key(&self) -> Key<'_>

Source§

impl ToKey for str

Source§

fn to_key(&self) -> Key<'_>

Source§

impl<'a> ToKey for Cow<'a, str>

Source§

fn to_key(&self) -> Key<'_>

Source§

impl<T> ToKey for &T
where T: ToKey + ?Sized,

Source§

fn to_key(&self) -> Key<'_>

Implementors§

Source§

impl<'k> ToKey for Key<'k>