Skip to main content

Module registry

Module registry 

Source
Expand description

Dispatch from a detected format to its handler.

The registry is a static table, not a plugin system. Nothing is loaded at runtime, ever (ADR-0011): a metadata scrubber that can be taught new behaviour by a file on disk has handed an attacker the tool’s own privileges over the user’s most sensitive documents.

Adding a format means adding a line here and implementing the trait. Core dispatch does not otherwise change, which is the point of the design.

Functions§

handler_for
The handler for format, or None if this release has none.
supported_formats
Every format this release can actually process.