pub struct ExtendedCatalog { /* private fields */ }Expand description
A runtime-extensible catalog wrapping the static CATALOG.
Supports additional custom decoders and custom artifact descriptors. The base catalog is unmodified.
Implementations§
Source§impl ExtendedCatalog
impl ExtendedCatalog
Sourcepub fn register_decoder<D: CustomDecoder + 'static>(&mut self, decoder: D)
pub fn register_decoder<D: CustomDecoder + 'static>(&mut self, decoder: D)
Register a custom decoder.
Sourcepub fn register_descriptor(&mut self, descriptor: ArtifactDescriptor)
pub fn register_descriptor(&mut self, descriptor: ArtifactDescriptor)
Register a custom artifact descriptor.
Sourcepub fn by_id(&self, id: &str) -> Option<&ArtifactDescriptor>
pub fn by_id(&self, id: &str) -> Option<&ArtifactDescriptor>
Look up an artifact descriptor by ID, checking custom descriptors first.
Sourcepub fn custom_decoder(&self, id: &str) -> Option<&dyn CustomDecoder>
pub fn custom_decoder(&self, id: &str) -> Option<&dyn CustomDecoder>
Find a custom decoder by ID.
Sourcepub fn custom_decoder_count(&self) -> usize
pub fn custom_decoder_count(&self) -> usize
Returns the number of registered custom decoders.
Sourcepub fn custom_descriptor_count(&self) -> usize
pub fn custom_descriptor_count(&self) -> usize
Returns the number of registered custom descriptors.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExtendedCatalog
impl !UnwindSafe for ExtendedCatalog
impl Freeze for ExtendedCatalog
impl Send for ExtendedCatalog
impl Sync for ExtendedCatalog
impl Unpin for ExtendedCatalog
impl UnsafeUnpin for ExtendedCatalog
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