pub struct Provider<T> { /* private fields */ }
Expand description
Represents the provider of an instance of type T
.
This struct is just a generic, intermediate representation of Provider
,
there is no pub method to direct create this struct,
Please use the following functions or attribute macros to create the various Provider
types that implement Into<Provider>
:
- functions
- attribute macros
Implementations§
Source§impl<T> Provider<T>
impl<T> Provider<T>
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.
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 Provider<T>
impl<T: 'static> From<SingleOwnerAsyncProvider<T>> for Provider<T>
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 Provider<T>
impl<T: 'static> From<SingleOwnerProvider<T>> for Provider<T>
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 Provider<T>
impl<T: 'static + Clone> From<SingletonAsyncProvider<T>> for Provider<T>
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 Provider<T>
impl<T: 'static + Clone> From<SingletonProvider<T>> for Provider<T>
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 Provider<T>
impl<T: 'static> From<TransientAsyncProvider<T>> for Provider<T>
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 Provider<T>
impl<T: 'static> From<TransientProvider<T>> for Provider<T>
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<T> Freeze for Provider<T>
impl<T> !RefUnwindSafe for Provider<T>
impl<T> !Send for Provider<T>
impl<T> !Sync for Provider<T>
impl<T> Unpin for Provider<T>
impl<T> !UnwindSafe for Provider<T>
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