Skip to main content

Crate musefs_db

Crate musefs_db 

Source

Modules§

convert
Sanctioned integer conversions, justified by the 64-bit-only guard below.
limits
Size and identity caps enforced at the DB boundary (#267/#269/#278).

Structs§

Art
ArtMeta
BinaryTag
A binary tag payload to write (e.g. an opaque ID3 PRIV frame body). key is the format-private identifier (ID3 frame id, APPLICATION/CUESHEET, ----:<mean>:<name>); payload is the post-header frame/block body.
BinaryTagRow
A binary tag row read back for synthesis: the streaming handle (rowid), the key, and the payload length — the bytes themselves stream at read time.
BulkWriter
A batch of track writes held in one transaction. Each method delegates to the shared per-row writer helper (upsert_track_in / replace_tags_in / set_binary_tags_in / set_structural_blocks_in / upsert_art_in / set_track_art_in) that also backs the Db<ReadWrite> writers, but runs it on a single caller-held transaction so a whole batch commits with one fsync.
ChangelogRead
One read of the changelog ring past last_seq: the distinct changed track ids (ascending) plus the table’s retained seq bounds (0/0 when empty). The caller derives gap detection from min_seq (see musefs-core’s refresh).
Db
A SQLite connection whose mode parameter says whether write APIs resolve.
NewArt
NewTrack
ReadOnly
Type-state markers for Db: the connection’s write capability, at the type level. Write APIs exist only on Db<ReadWrite>.
ReadWrite
StructuralBlock
A read-only structural metadata block derived from the backing file (FLAC STREAMINFO/SEEKTABLE). Stored outside the editable tags contract.
Tag
Track
TrackArt
TrackBounds
Validated audio-region bounds for a track: audio_offset + audio_length is guaranteed to fit within backing_size, so the reader can splice the audio region without re-checking. Built at the tracks row reader.

Enums§

DbError
Format
The DB text representation (the tracks.format column) is derived: serialize_all = "lowercase" lowercases the whole variant ident (OggFlac"oggflac"). The strings are an external contract — beets/Picard write them — pinned by tests::db_strings_are_pinned.

Type Aliases§

Result