pub struct CardinalContext {
pub config: Arc<CardinalConfig>,
/* private fields */
}Fields§
§config: Arc<CardinalConfig>Implementations§
Source§impl CardinalContext
impl CardinalContext
pub fn new(config: CardinalConfig) -> Self
pub fn register<T>(&self, scope: ProviderScope)
pub fn register_with_factory<T, F, Fut>(&self, scope: ProviderScope, factory: F)
pub fn register_singleton_instance<T>(&self, instance: Arc<T>)
pub fn is_registered<T>(&self) -> bool
pub async fn get<T>(&self) -> Result<Arc<T>, CardinalError>
pub async fn build_eager<T>(&self) -> Result<Arc<T>, CardinalError>
Auto Trait Implementations§
impl !Freeze for CardinalContext
impl !RefUnwindSafe for CardinalContext
impl Send for CardinalContext
impl Sync for CardinalContext
impl Unpin for CardinalContext
impl !UnwindSafe for CardinalContext
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