pub struct ProviderDef { /* private fields */ }Expand description
Re-exported public API.
Public Caelix type ProviderDef.
Implementations§
Source§impl ProviderDef
impl ProviderDef
Sourcepub fn of<T: Injectable>() -> Self
pub fn of<T: Injectable>() -> Self
Runs the of public API operation.
Sourcepub fn instance<T: Send + Sync + 'static>(value: T) -> Self
pub fn instance<T: Send + Sync + 'static>(value: T) -> Self
Pre-built provider value for tests and other manual registration paths.
Lifecycle hooks are no-ops (useValue semantics).
Sourcepub fn async_factory<T, Fut, E>(
dependencies: Vec<ProviderDependency>,
factory: impl Fn(Arc<Container>) -> Fut + Send + Sync + 'static,
) -> Self
pub fn async_factory<T, Fut, E>( dependencies: Vec<ProviderDependency>, factory: impl Fn(Arc<Container>) -> Fut + Send + Sync + 'static, ) -> Self
Runs the async_factory public API operation.
Auto Trait Implementations§
impl !RefUnwindSafe for ProviderDef
impl !UnwindSafe for ProviderDef
impl Freeze for ProviderDef
impl Send for ProviderDef
impl Sync for ProviderDef
impl Unpin for ProviderDef
impl UnsafeUnpin for ProviderDef
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