TestInstanceIdKey

Trait TestInstanceIdKey 

Source
pub trait TestInstanceIdKey {
    // Required method
    fn key<'k>(&'k self) -> TestInstanceId<'k>;
}
Expand description

Trait to allow retrieving data from a set of OwnedTestInstanceId using a TestInstanceId.

This is an implementation of the borrow-complex-key-example pattern.

Required Methods§

Source

fn key<'k>(&'k self) -> TestInstanceId<'k>

Converts self to a TestInstanceId.

Trait Implementations§

Source§

impl<'a> Borrow<dyn TestInstanceIdKey + 'a> for OwnedTestInstanceId

Source§

fn borrow(&self) -> &(dyn TestInstanceIdKey + 'a)

Immutably borrows from an owned value. Read more
Source§

impl<'a> Hash for dyn TestInstanceIdKey + 'a

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'a> Ord for dyn TestInstanceIdKey + 'a

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl<'a> PartialEq for dyn TestInstanceIdKey + 'a

Source§

fn eq(&self, other: &(dyn TestInstanceIdKey + 'a)) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> PartialOrd for dyn TestInstanceIdKey + 'a

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Eq for dyn TestInstanceIdKey + 'a

Implementors§