Struct rudi::DynProvider
source · pub struct DynProvider { /* private fields */ }
Expand description
Represents a Provider
that erased its type.
Implementations§
source§impl DynProvider
impl DynProvider
sourcepub fn definition(&self) -> &Definition
pub fn definition(&self) -> &Definition
Returns the Definition
of the provider.
sourcepub fn eager_create(&self) -> bool
pub fn eager_create(&self) -> bool
Returns whether the provider is eager create.
sourcepub fn binding_definitions(&self) -> Option<&Vec<Definition>>
pub fn binding_definitions(&self) -> Option<&Vec<Definition>>
Returns definitions of the binding providers.
sourcepub fn as_provider<T: 'static>(&self) -> Option<&Provider<T>>
pub fn as_provider<T: 'static>(&self) -> Option<&Provider<T>>
Returns a reference of the origin Provider
.
Trait Implementations§
source§impl<T: 'static> From<Provider<T>> for DynProvider
impl<T: 'static> From<Provider<T>> for DynProvider
source§impl<T: 'static> From<SingleOwnerAsyncProvider<T>> for DynProvider
impl<T: 'static> From<SingleOwnerAsyncProvider<T>> for DynProvider
source§fn from(value: SingleOwnerAsyncProvider<T>) -> Self
fn from(value: SingleOwnerAsyncProvider<T>) -> Self
Converts to this type from the input type.
source§impl<T: 'static> From<SingleOwnerProvider<T>> for DynProvider
impl<T: 'static> From<SingleOwnerProvider<T>> for DynProvider
source§fn from(value: SingleOwnerProvider<T>) -> Self
fn from(value: SingleOwnerProvider<T>) -> Self
Converts to this type from the input type.
source§impl<T: 'static + Clone> From<SingletonAsyncProvider<T>> for DynProvider
impl<T: 'static + Clone> From<SingletonAsyncProvider<T>> for DynProvider
source§fn from(value: SingletonAsyncProvider<T>) -> Self
fn from(value: SingletonAsyncProvider<T>) -> Self
Converts to this type from the input type.
source§impl<T: 'static + Clone> From<SingletonProvider<T>> for DynProvider
impl<T: 'static + Clone> From<SingletonProvider<T>> for DynProvider
source§fn from(value: SingletonProvider<T>) -> Self
fn from(value: SingletonProvider<T>) -> Self
Converts to this type from the input type.
source§impl<T: 'static> From<TransientAsyncProvider<T>> for DynProvider
impl<T: 'static> From<TransientAsyncProvider<T>> for DynProvider
source§fn from(value: TransientAsyncProvider<T>) -> Self
fn from(value: TransientAsyncProvider<T>) -> Self
Converts to this type from the input type.
source§impl<T: 'static> From<TransientProvider<T>> for DynProvider
impl<T: 'static> From<TransientProvider<T>> for DynProvider
source§fn from(value: TransientProvider<T>) -> Self
fn from(value: TransientProvider<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DynProvider
impl !RefUnwindSafe for DynProvider
impl !Send for DynProvider
impl !Sync for DynProvider
impl Unpin for DynProvider
impl !UnwindSafe for DynProvider
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