Skip to main content

UnsupportedKind

Enum UnsupportedKind 

Source
#[non_exhaustive]
pub enum UnsupportedKind {
Show 22 variants NotYetImplemented(Format), ZipContainer, MacroEnabledOffice, OtherOpenDocument, BigTiff, IsoBaseMedia, FragmentedMp4, ProtectedMedia, QuickTimeMovie, ThirdGenerationPartnership, MotionHeif, OggTheora, OtherOggCodec, MultiplexedOgg, MpegAudioNotLayerThree, OtherRiff, Rf64, WaveList, Xml, Gzip, ScriptedSvg, UnknownJxlBox,
}
Expand description

A format strypt can identify but cannot yet process.

Naming it is worth the small amount of detection code: “this is an OpenXML document, which arrives in Phase 2” is actionable, where “unrecognised” sends the user away believing their file is exotic when it is merely out of scope.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NotYetImplemented(Format)

A format strypt identifies and has a place for, but whose handler has not landed yet.

Distinct from the Phase 2 formats below, because the advice differs: “not in this release” versus “not in this phase of the project”.

§

ZipContainer

A ZIP container, which may be an Office document, an ODF document, or an archive.

§

MacroEnabledOffice

A macro-enabled Office document — .docm, .xlsm, .pptm.

Refused rather than handled, and named separately from Self::ZipContainer because the advice differs. This is not “a later phase will get to it”: the document carries a vbaProject.bin, which is an OLE compound file with its own directory and its own metadata streams that strypt cannot read. Reporting the document clean while a container inside it went unexamined is the failure in docs/THREAT_MODEL.md §5.4 (ADR-0029).

§

OtherOpenDocument

An OpenDocument package of a type this release does not handle — a drawing, a formula, a chart, a database, or any of the -template variants.

Named separately from Self::ZipContainer because the two say different things to a user: this one means the file was understood and declined, where the generic refusal sounds like it was not recognised at all. docs/ROADMAP.md Phase 2 group 2 is .odt, .ods, and .odp, and widening that needs a superseding ADR (ADR-0027).

§

BigTiff

BigTIFF: the same byte-order marks as TIFF but magic number 43, with eight-byte offsets throughout. Refused by name rather than parsed as the TIFF it is not, because a parser reading its directories as ordinary TIFF ones produces confident nonsense (ADR-0033).

§

IsoBaseMedia

An ISO base-media file whose brands name nothing this release handles.

Still HEIF and AVIF, progressive MP4 and M4A all have handlers, so what reaches this variant is a container declaring some other brand entirely — or a motion HEIF, which carries a still-image brand alongside a sequence one.

§

FragmentedMp4

A fragmented MP4 — a moof, mfra, mvex, styp or sidx box, or a DASH/CMAF brand.

Refused rather than edited. tfhd’s base_data_offset and every tfra entry are absolute file offsets again, spread across fragments this handler does not read, so the relocation table the MP4 handler is built on cannot be constructed for them (ADR-0042). A fragmented file edited as though it were progressive still opens and plays nothing.

§

ProtectedMedia

An MP4 or M4A under Common Encryption or FairPlay — a pssh box, an encv/enca/drms sample entry, or the M4P brand.

Refused on the reasoning behind Self::MacroEnabledOffice: the samples are ciphertext no rule here matches, so reporting the file clean would mean reporting on a file nobody examined (docs/THREAT_MODEL.md §5.4, ADR-0042).

§

QuickTimeMovie

A QuickTime movie — a .mov, declaring the qt brand.

The same box grammar as MP4 and a different vocabulary on top of it. Phase 2’s fourth group is MP4 and M4A (ADR-0037); widening it is a superseding ADR rather than a judgement call.

§

ThirdGenerationPartnership

A 3GPP or 3GPP2 file — the 3gp/3g2 brand family.

Named rather than left as Self::IsoBaseMedia, because it is a format a user has a name for. Out of ADR-0037’s scope for the reason Self::QuickTimeMovie is.

§

MotionHeif

A HEIF or AVIF that carries a motion sequence as well as, or instead of, a still image.

An Apple Live Photo is the common case: an ordinary-looking .HEIC with a video track beside the picture. Named separately from Self::IsoBaseMedia because the user’s file is a photograph as far as they are concerned, and “this is an MP4” would be baffling.

Refused rather than partly cleaned. docs/ROADMAP.md puts video containers in Phase 2’s fourth group; stripping the still and discarding the track would change what the file is (docs/PRD.md §8.1) and would delete a track carrying its own metadata that nobody parsed (ADR-0034).

§

OggTheora

An Ogg carrying Theora video.

Video is Phase 2’s fifth tranche at the earliest (ADR-0037), and a Theora stream carries its own comment header this handler has not read.

§

OtherOggCodec

An Ogg whose codec strypt has no mapping for — Speex, Skeleton, or something unrecognised.

The container is the same; what is in the packets is not, and the metadata lives in the packets (ADR-0041).

§

MultiplexedOgg

An Ogg carrying more than one logical bitstream: a multiplexed or a chained file.

Refused rather than partly cleaned. A second stream is a second mapping with a second comment header, and cleaning one while copying the other through is the failure in docs/THREAT_MODEL.md §5.4 (ADR-0041 decision 6).

§

MpegAudioNotLayerThree

MPEG audio that is not Layer III — an .mp1 or .mp2.

The same frame grammar as MP3 and a different format, so it is named rather than stripped as one. Phase 2’s scope is MP3 (ADR-0027), and the layer field is what says which of the three a file is (ADR-0040).

§

OtherRiff

A RIFF container that is neither WebP nor WAV, such as AVI.

§

Rf64

An RF64 or BW64 file: a WAV whose payload exceeds what a 32-bit RIFF size can express.

A different container spelling, not a large WAV. The real sizes live in a ds64 chunk and the RIFF size field is a -1 placeholder, so a handler that treated it as WAV would walk the wrong extent. Named rather than left unrecognised (ADR-0039).

§

WaveList

A WAV whose audio is a wavl wave list rather than a single data chunk.

The one WAV shape where removing a chunk could move something: cue offsets index into the wave list’s data section, which is exactly what ADR-0034 found in HEIF. Refused rather than edited, because getting it wrong yields a file that still plays the wrong bytes (ADR-0039).

§

Xml

An XML document that is not an SVG this release claims.

Also where an SVG with a prefixed root element — <svg:svg>, which very old Inkscape releases wrote — lands. The handler removes prefixed elements on an allow-list (ADR-0035), so claiming that document would mean removing it; refusing is fail-closed.

§

Gzip

A gzip stream, which in this project’s world is usually a .svgz.

Refused rather than handled. Inflating it would put a decompressor on the input path and a compressor on the output path for no metadata gain, and the user can decompress it themselves in one command (ADR-0035). Named rather than left unrecognised, because “unrecognised” is untrue for a common spelling of a format strypt does handle.

§

ScriptedSvg

An SVG carrying a script, an event-handler attribute, or a foreignObject.

Refused rather than partly cleaned, on the same reasoning as Self::MacroEnabledOffice: the document contains executable code strypt has no parser for, which is free to hold a name, a path, a credential, or a base64 copy of anything at all. Removing it would change what the file does (docs/PRD.md §8.1); keeping it would mean reporting success on a file that runs unexamined code the moment a reader opens it, which is docs/THREAT_MODEL.md §5.4. mat2 re-renders SVG and is the better recommendation for a user who needs the script gone (ADR-0035).

§

UnknownJxlBox

A JPEG XL carrying a top-level box strypt does not recognise.

Boxes reach the output from an allow-list, so an unrecognised one is refused rather than copied through: an unknown top-level box in a format that keeps its metadata in top-level boxes is more likely to be metadata than not (ADR-0036).

Trait Implementations§

Source§

impl Clone for UnsupportedKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for UnsupportedKind

Source§

impl Debug for UnsupportedKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for UnsupportedKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for UnsupportedKind

Source§

impl PartialEq for UnsupportedKind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UnsupportedKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.