Trait Key

Source
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§

Source

type Owned: 'static

The owned version of the key.

Required Methods§

Source

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

Returns the owned version of the key.

Source

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

Compares the key with the given owned version.

Implementations on Foreign Types§

Source§

impl Key for ()

Source§

type Owned = ()

Source§

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

Source§

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

Source§

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

Source§

type Owned = <T as ToOwned>::Owned

Source§

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

Source§

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

Implementors§