pub enum DocumentFormat {
Pdf,
Docx,
Epub,
Odt,
Opaque,
}Expand description
A detected document format (the class of the field’s source bytes).
Variants§
A validated PDF (physical indicators).
Docx
An OPC package with a WordprocessingML officeDocument part.
Epub
An OCF container with an EPUB package document.
Odt
An ODF package with an OpenDocument text content part.
Opaque
Anything else; preserved exactly by the opaque floor.
Implementations§
Source§impl DocumentFormat
impl DocumentFormat
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Stable lower-case name (used in JSON and in the manifest provenance token).
Sourcepub const fn adapter(self) -> &'static str
pub const fn adapter(self) -> &'static str
The adapter that serves this format (the observation layer’s name for it).
Sourcepub const fn compiled(self) -> bool
pub const fn compiled(self) -> bool
Whether the adapter for this format is compiled into this build.
Sourcepub fn provenance_prefix(self) -> String
pub fn provenance_prefix(self) -> String
The machine-readable format=<name>; provenance prefix recorded at ingest.
Sourcepub fn from_provenance(provenance: &str) -> Option<DocumentFormat>
pub fn from_provenance(provenance: &str) -> Option<DocumentFormat>
Recover the recorded format from a field manifest’s provenance string.
Returns None for a manifest that does not carry the token (e.g. a field
written before this subphase); such a field still serves every native
selector, but common observations decline typed rather than guessing.