pub struct ContextRegistryBuilder {
pub providers: RwLock<Vec<Arc<dyn ErasedContextProvider>>>,
/* private fields */
}Fields§
§providers: RwLock<Vec<Arc<dyn ErasedContextProvider>>>Implementations§
Source§impl ContextRegistryBuilder
impl ContextRegistryBuilder
pub fn register<T>(&self, provider: T)where
T: ErasedContextProvider + 'static,
pub fn register_erased(&self, provider: Arc<dyn ErasedContextProvider>)
pub fn subscribe(&self) -> Receiver<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ContextRegistryBuilder
impl RefUnwindSafe for ContextRegistryBuilder
impl Send for ContextRegistryBuilder
impl Sync for ContextRegistryBuilder
impl Unpin for ContextRegistryBuilder
impl UnsafeUnpin for ContextRegistryBuilder
impl UnwindSafe for ContextRegistryBuilder
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