pub struct ProjectionRegistry { /* private fields */ }Expand description
Open loaded registry keyed by projection kind.
Implementations§
Source§impl ProjectionRegistry
impl ProjectionRegistry
Sourcepub fn register(
&mut self,
identity: PackageIdentity,
provider: Arc<dyn ProjectionProvider>,
) -> Result<(), ProjectionError>
pub fn register( &mut self, identity: PackageIdentity, provider: Arc<dyn ProjectionProvider>, ) -> Result<(), ProjectionError>
Loads one provider without changing a central kind enum.
§Errors
Refuses without changing this registry’s state if kind is already
loaded: a caller cannot silently replace an admitted provider (and,
with it, drop the live checker owner backing its qualification) by
registering a second one under the same kind.
Sourcepub fn get(
&self,
kind: &ProjectionKindRef,
) -> Option<(&PackageIdentity, &Arc<dyn ProjectionProvider>)>
pub fn get( &self, kind: &ProjectionKindRef, ) -> Option<(&PackageIdentity, &Arc<dyn ProjectionProvider>)>
Resolves a loaded provider.
Sourcepub fn kinds(&self) -> impl ExactSizeIterator<Item = &ProjectionKindRef>
pub fn kinds(&self) -> impl ExactSizeIterator<Item = &ProjectionKindRef>
Lists loaded kinds in canonical order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProjectionRegistry
impl !UnwindSafe for ProjectionRegistry
impl Freeze for ProjectionRegistry
impl Send for ProjectionRegistry
impl Sync for ProjectionRegistry
impl Unpin for ProjectionRegistry
impl UnsafeUnpin for ProjectionRegistry
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