pub struct ServiceId {
pub type_id: TypeId,
pub type_name: &'static str,
pub name: Option<String>,
}
Expand description
Service identifier combining type and optional name
Fields§
§type_id: TypeId
§type_name: &'static str
§name: Option<String>
Implementations§
Source§impl ServiceId
impl ServiceId
Sourcepub fn named<T: 'static + ?Sized>(name: impl Into<String>) -> Self
pub fn named<T: 'static + ?Sized>(name: impl Into<String>) -> Self
Create a named service ID for a type
Sourcepub fn matches_named<T: 'static + ?Sized>(&self, name: &str) -> bool
pub fn matches_named<T: 'static + ?Sized>(&self, name: &str) -> bool
Check if this ServiceId matches a type and name without allocating
Sourcepub fn by_ids(type_id: TypeId, type_name: &'static str) -> Self
pub fn by_ids(type_id: TypeId, type_name: &'static str) -> Self
Create a service ID directly from type IDs and names
Sourcepub fn named_by_ids(
type_id: TypeId,
type_name: &'static str,
name: String,
) -> Self
pub fn named_by_ids( type_id: TypeId, type_name: &'static str, name: String, ) -> Self
Create a named service ID directly from type IDs and names
Trait Implementations§
impl Eq for ServiceId
impl StructuralPartialEq for ServiceId
Auto Trait Implementations§
impl Freeze for ServiceId
impl RefUnwindSafe for ServiceId
impl Send for ServiceId
impl Sync for ServiceId
impl Unpin for ServiceId
impl UnwindSafe for ServiceId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.