Skip to main content

Module plugin

Module plugin 

Source
Expand description

Plugin trait for archive-type-aware metadata extraction.

Two modes:

  • Per-file: plugin.extract_metadata() called inline (e.g. CargoPlugin — filename only)
  • Batch: files staged in IngestBatch, plugin called once before compression starts. Data is still in memory (zero-copy borrows) — no extra allocation.

The batch runs BETWEEN read and compress: read N files → batch extract (zero-copy &u8) → chunk → compress → write

Re-exports§

pub use self::ArchiveTypePlugin as PackageHandler;

Structs§

BatchItem
Item in a batch — borrows data already in memory
ExtensionRow
Metadata extracted from a single file by a plugin
HandlerCommand
One handler-specific subcommand advertised through HandlerMeta::commands. This is the unit of a package handler’s “API” that the CLI can list and dispatch.
HandlerMeta
Discovery metadata for a package handler — the single source of truth the registry uses to enumerate handlers at runtime (znippy handlers) and to resolve a --format <name> selection (canonical name or any alias).
IngestBatch
A batch of files staged for ingest. Holds file data in memory; plugin borrows it (zero-copy) before compression begins.
PluginRegistry
Registry holding the single active package handler.
StagedFile
A file staged in the batch — owns the data until compression consumes it

Enums§

ExtensionValue
Typed values for extension fields

Traits§

ArchiveTypePlugin
Trait implemented by each archive type plugin.