pub struct GenericPlugin;Expand description
Archive any tree as opaque blobs. Extracts no metadata, claims no extension, contributes no Arrow column.
The type_id matters even though nothing is extracted: it is what stops a
generic archive from being indistinguishable from a cargo one, and what
makes znippy decompress --type generic mean something.
Implementations§
Source§impl GenericPlugin
impl GenericPlugin
Trait Implementations§
Source§impl ArchiveTypePlugin for GenericPlugin
impl ArchiveTypePlugin for GenericPlugin
Source§fn type_id(&self) -> i8
fn type_id(&self) -> i8
26 — the first free discriminant above the skeletons (4-24) and media (25),
and below the out-of-crate handlers (40-42). Asserted against the whole
register by znippy-cli’s handlers tests rather than restated here.
Source§fn matches_path(&self, _path: &str) -> bool
fn matches_path(&self, _path: &str) -> bool
Permanently false, which is the whole point: PluginRegistry::extract
gates on this, so extract_metadata is never
reached and the compress path pays nothing per file.
Source§fn extract_metadata(&self, _path: &str, _data: &[u8]) -> Option<ExtensionRow>
fn extract_metadata(&self, _path: &str, _data: &[u8]) -> Option<ExtensionRow>
Unreachable through the registry (see matches_path),
and None if a caller invokes it directly: there is no metadata to claim.
Source§fn meta(&self) -> HandlerMeta
fn meta(&self) -> HandlerMeta
Self::name / Self::type_id; native handlers override it with a
richer record (aliases, ecosystem, extensions, commands).Source§fn run_command(&self, cmd: &str, _args: &[String]) -> Result<()>
fn run_command(&self, cmd: &str, _args: &[String]) -> Result<()>
HandlerMeta::commands).
Default: the handler exposes no extra subcommands.Source§fn schema_fields(&self) -> Vec<Field>
fn schema_fields(&self) -> Vec<Field>
base columns + pkg_type + these fields. Each Field’s name must
match the key the plugin uses in ExtensionRow::fields. Default: no columns.