Struct di::ServiceDependency
source · pub struct ServiceDependency { /* private fields */ }Expand description
Represents a service dependency.
Implementations§
source§impl ServiceDependency
impl ServiceDependency
sourcepub fn new(injected_type: Type, cardinality: ServiceCardinality) -> Self
pub fn new(injected_type: Type, cardinality: ServiceCardinality) -> Self
Initializes a new service dependency.
Arguments
injected_type- The injected type of the service dependencycardinality- The cardinality of the service dependency
sourcepub fn injected_type(&self) -> &Type
pub fn injected_type(&self) -> &Type
Gets the injected type associated with the service dependency.
sourcepub fn cardinality(&self) -> ServiceCardinality
pub fn cardinality(&self) -> ServiceCardinality
Gets the cardinality associated with the service dependency.
Trait Implementations§
source§impl Clone for ServiceDependency
impl Clone for ServiceDependency
source§fn clone(&self) -> ServiceDependency
fn clone(&self) -> ServiceDependency
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ServiceDependency
impl Debug for ServiceDependency
source§impl PartialEq for ServiceDependency
impl PartialEq for ServiceDependency
source§fn eq(&self, other: &ServiceDependency) -> bool
fn eq(&self, other: &ServiceDependency) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ServiceDependency
Auto Trait Implementations§
impl RefUnwindSafe for ServiceDependency
impl Send for ServiceDependency
impl Sync for ServiceDependency
impl Unpin for ServiceDependency
impl UnwindSafe for ServiceDependency
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