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§
Sourcefn key<'k>(&'k self) -> TestInstanceId<'k>
fn key<'k>(&'k self) -> TestInstanceId<'k>
Converts self to a TestInstanceId.
Trait Implementations§
Source§impl<'a> Borrow<dyn TestInstanceIdKey + 'a> for OwnedTestInstanceId
impl<'a> Borrow<dyn TestInstanceIdKey + 'a> for OwnedTestInstanceId
Source§fn borrow(&self) -> &(dyn TestInstanceIdKey + 'a)
fn borrow(&self) -> &(dyn TestInstanceIdKey + 'a)
Immutably borrows from an owned value. Read more
Source§impl<'a> Hash for dyn TestInstanceIdKey + 'a
impl<'a> Hash for dyn TestInstanceIdKey + 'a
Source§impl<'a> Ord for dyn TestInstanceIdKey + 'a
impl<'a> Ord for dyn TestInstanceIdKey + 'a
Source§impl<'a> PartialEq for dyn TestInstanceIdKey + 'a
impl<'a> PartialEq for dyn TestInstanceIdKey + 'a
Source§fn eq(&self, other: &(dyn TestInstanceIdKey + 'a)) -> bool
fn eq(&self, other: &(dyn TestInstanceIdKey + 'a)) -> bool
Tests for
self and other values to be equal, and is used by ==.