pub struct ContributionCollection { /* private fields */ }Expand description
Mutable, typed multi-binding registry used while plugins are installed.
Services represent a single authoritative implementation for a type. Contributions represent zero or more independent implementations, such as HTTP modules, notification sinks, health checks, or event observers.
Implementations§
Source§impl ContributionCollection
impl ContributionCollection
Adds one trait-object contribution while retaining a typed retrieval API.
Sourcepub fn get<T>(&self) -> Vec<Arc<T>>
pub fn get<T>(&self) -> Vec<Arc<T>>
Returns all concrete contributions currently registered for T.
Returns all trait-object contributions currently registered for T.
pub fn freeze(self) -> FrozenContributions
Trait Implementations§
Source§impl Debug for ContributionCollection
impl Debug for ContributionCollection
Source§impl Default for ContributionCollection
impl Default for ContributionCollection
Source§fn default() -> ContributionCollection
fn default() -> ContributionCollection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ContributionCollection
impl !UnwindSafe for ContributionCollection
impl Freeze for ContributionCollection
impl Send for ContributionCollection
impl Sync for ContributionCollection
impl Unpin for ContributionCollection
impl UnsafeUnpin for ContributionCollection
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