Struct dilib::InjectionKey
source · [−]pub struct InjectionKey<'a> { /* private fields */ }Expand description
Represents an unique key for identify a provider.
Implementations
sourceimpl<'a> InjectionKey<'a>
impl<'a> InjectionKey<'a>
sourcepub fn new<S>(type_id: TypeId, name: Option<S>) -> Self where
S: Into<Cow<'a, str>>,
pub fn new<S>(type_id: TypeId, name: Option<S>) -> Self where
S: Into<Cow<'a, str>>,
Constructs a new InjectionKey.
Params
type_id: The type of the value returned by the provider of this key.name: The name of the key.
sourcepub fn of<T: ?Sized + 'static>() -> Self
pub fn of<T: ?Sized + 'static>() -> Self
Constructs a new InjectionKey from the specified type T.
Trait Implementations
sourceimpl<'a> Clone for InjectionKey<'a>
impl<'a> Clone for InjectionKey<'a>
sourcefn clone(&self) -> InjectionKey<'a>
fn clone(&self) -> InjectionKey<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for InjectionKey<'a>
impl<'a> Debug for InjectionKey<'a>
sourceimpl<'a> Hash for InjectionKey<'a>
impl<'a> Hash for InjectionKey<'a>
sourceimpl<'a> Ord for InjectionKey<'a>
impl<'a> Ord for InjectionKey<'a>
sourceimpl<'a> PartialEq<InjectionKey<'a>> for InjectionKey<'a>
impl<'a> PartialEq<InjectionKey<'a>> for InjectionKey<'a>
sourcefn eq(&self, other: &InjectionKey<'a>) -> bool
fn eq(&self, other: &InjectionKey<'a>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &InjectionKey<'a>) -> bool
fn ne(&self, other: &InjectionKey<'a>) -> bool
This method tests for !=.
sourceimpl<'a> PartialOrd<InjectionKey<'a>> for InjectionKey<'a>
impl<'a> PartialOrd<InjectionKey<'a>> for InjectionKey<'a>
sourcefn partial_cmp(&self, other: &InjectionKey<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &InjectionKey<'a>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<'a> Eq for InjectionKey<'a>
impl<'a> StructuralEq for InjectionKey<'a>
impl<'a> StructuralPartialEq for InjectionKey<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for InjectionKey<'a>
impl<'a> Send for InjectionKey<'a>
impl<'a> Sync for InjectionKey<'a>
impl<'a> Unpin for InjectionKey<'a>
impl<'a> UnwindSafe for InjectionKey<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more