pub struct LocalImplementationRegistry<T> { /* private fields */ }Expand description
Generic process-local registry keyed by a validated implementation descriptor.
Resolution always requires the complete expected descriptor. A matching opaque registry key alone is insufficient because replay must also match the semantic, implementation and descriptor fingerprints.
Implementations§
Source§impl<T> LocalImplementationRegistry<T>
impl<T> LocalImplementationRegistry<T>
pub fn new() -> Self
pub fn register( &mut self, descriptor: ImplementationDescriptor, implementation: T, ) -> Result<()>
pub fn register_loss( &mut self, loss: &LossReference, implementation: T, ) -> Result<()>
pub fn register_metric( &mut self, metric: &MetricReference, implementation: T, ) -> Result<()>
pub fn resolve(&self, descriptor: &ImplementationDescriptor) -> Result<&T>
pub fn resolve_loss(&self, loss: &LossReference) -> Result<&T>
pub fn resolve_metric(&self, metric: &MetricReference) -> Result<&T>
pub fn unregister(&mut self, descriptor: &ImplementationDescriptor) -> Result<T>
pub fn descriptors(&self) -> impl Iterator<Item = &ImplementationDescriptor>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LocalImplementationRegistry<T>
impl<T> RefUnwindSafe for LocalImplementationRegistry<T>where
T: RefUnwindSafe,
impl<T> Send for LocalImplementationRegistry<T>where
T: Send,
impl<T> Sync for LocalImplementationRegistry<T>where
T: Sync,
impl<T> Unpin for LocalImplementationRegistry<T>
impl<T> UnsafeUnpin for LocalImplementationRegistry<T>
impl<T> UnwindSafe for LocalImplementationRegistry<T>where
T: RefUnwindSafe,
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