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).
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new() -> Self
pub fn with_plugin(plugin: Box<dyn ArchiveTypePlugin>) -> Self
Sourcepub fn extract(&self, path: &str, data: &[u8]) -> Option<ExtensionRow>
pub fn extract(&self, path: &str, data: &[u8]) -> Option<ExtensionRow>
Per-file extract (None when the handler does not claim the path).
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