Key

Trait Key 

pub trait Key {
    type Owned: 'static;

    // Required methods
    fn to_owned(&self) -> Self::Owned;
    fn eq(&self, other: &Self::Owned) -> bool;
}
Expand description

The key of a widget.

You should generally not need to care about this trait.

Required Associated Types§

type Owned: 'static

The owned version of the key.

Required Methods§

fn to_owned(&self) -> Self::Owned

Returns the owned version of the key.

fn eq(&self, other: &Self::Owned) -> bool

Compares the key with the given owned version.

Implementations on Foreign Types§

§

impl Key for ()

§

type Owned = ()

§

fn to_owned(&self) -> <() as Key>::Owned

§

fn eq(&self, _other: &<() as Key>::Owned) -> bool

§

impl<T> Key for &T
where T: ToOwned + PartialEq<<T as ToOwned>::Owned> + ?Sized, <T as ToOwned>::Owned: 'static,

§

type Owned = <T as ToOwned>::Owned

§

fn to_owned(&self) -> <&T as Key>::Owned

§

fn eq(&self, other: &<&T as Key>::Owned) -> bool

Implementors§