pub struct PluginRegistry { /* private fields */ }Expand description
Registry holding the single active package handler.
One znippy archive carries one package type, so the registry holds exactly
one handler (selected by --format). Combining multiple package types, or
signing/merging archives, is a higher-layer concern (the sibling holger
repo) — not something znippy does internally.
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new() -> Self
pub fn with_plugin(plugin: Box<dyn ArchiveTypePlugin>) -> Self
Sourcepub fn batch_threshold(&self) -> usize
pub fn batch_threshold(&self) -> usize
Get batch threshold from the handler (or default 200MB if none).
Sourcepub fn extract_batch(&self, batch: &mut IngestBatch)
pub fn extract_batch(&self, batch: &mut IngestBatch)
Run extraction on a batch (delegates to the handler).
Sourcepub fn extract(&self, path: &str, data: &[u8]) -> Option<ExtensionRow>
pub fn extract(&self, path: &str, data: &[u8]) -> Option<ExtensionRow>
Per-file extract (convenience for non-batched paths).
Sourcepub fn extract_typed(
&self,
path: &str,
data: &[u8],
) -> Option<(i8, ExtensionRow)>
pub fn extract_typed( &self, path: &str, data: &[u8], ) -> Option<(i8, ExtensionRow)>
Per-file extract returning the handler’s type_id alongside the row.
pub fn type_id(&self) -> Option<i8>
Sourcepub fn schema_fields(&self) -> Vec<Field>
pub fn schema_fields(&self) -> Vec<Field>
Arrow columns contributed by the active handler (empty if none).
pub fn matches(&self, path: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PluginRegistry
impl !UnwindSafe for PluginRegistry
impl Freeze for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin for PluginRegistry
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