Skip to main content

Crate musefs_format

Crate musefs_format 

Source

Re-exports§

pub use ogg::Codec;
pub use ogg::OggHeader;
pub use ogg::OggScan;
pub use probe::Extent;

Modules§

flac
mp3
mp4
Hand-rolled MP4/M4A box layer: parse the structure, read iTunes metadata, and regenerate moov (with patched chunk offsets) to synthesize a re-tagged file whose mdat audio payload is served verbatim. Strict: anything outside the supported shape (single audio track, one mdat, non-fragmented) is rejected.
ogg
probe
Shared outcome type for bounded metadata probing: a format parser is given only a prefix of the file (plus the true file_len) and either completes, or reports the exact byte offset it must reach to continue.
wav

Structs§

ArtInput
A reference to one embedded picture to synthesize. The image bytes themselves are NOT held here — only data_len, the exact byte length — because the caller streams the image into the spliced region at read time. art_id is an opaque handle the caller maps back to its blob store.
BinaryTagInput
A reference to one opaque binary tag payload to synthesize. Like ArtInput, the bytes are NOT held here — only len and payload_id, an opaque handle the caller (musefs-core) maps to the tags rowid it streams from. key is the format-private identifier the synthesis path decodes (ID3 frame id, APPLICATION/CUESHEET, ----:<mean>:<name>).
BlobLen
A non-zero payload length for an art image or binary tag. The non-zero invariant encodes the layout’s EmptySegment rule at the type level: a degenerate empty payload is dropped at the construction boundary, so a metadata segment can never carry a zero length.
EmbeddedBinaryTag
A binary tag frame extracted at scan time: the format-private identifier (key — an ID3 4-char frame id, a FLAC APPLICATION/CUESHEET, or an MP4 ----:<mean>:<name>) and the raw post-header body (payload). Unlike BinaryTagInput, this owns the bytes (scan ingests them into the DB).
EmbeddedPicture
An embedded picture extracted from a backing file at scan time (a FLAC PICTURE block or an MP3 APIC frame), before it is content-addressed and stored.
PictureType
An ID3/FLAC picture type, validated to the 0..=20 range (the #199 track_art CHECK, mirrored Rust-side at the synthesis-input boundary).
RegionLayout
An ordered description of a synthesized virtual file: the metadata region (inline framing + art images) followed by the backing audio. Totals are computed once at construction; segments is private so they cannot desync.
TagInput
One Vorbis/ID3 tag value to synthesize. Multi-valued tags are passed as multiple TagInputs in the desired order.

Enums§

FormatError
LayoutError
Validation errors discovered in a layout at synthesis time.
Segment
One contiguous run of bytes in a synthesized virtual file.

Functions§

is_valid_vorbis_key
True if key is a legal VorbisComment field name: one or more characters in ASCII 0x20..=0x7D, excluding 0x3D (=). This is the Vorbis spec grammar and matches what mutagen/TagLib enforce when writing. Non-ASCII, control chars, =, and the empty string are all rejected.

Type Aliases§

Result