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.
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§
Source§impl Default for ProjectionRegistry
impl Default for ProjectionRegistry
Source§fn default() -> ProjectionRegistry
fn default() -> ProjectionRegistry
Returns the “default value” for a type. Read more
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