Skip to main content

Crate dsf

Crate dsf 

Source
Expand description

Read and write DSF files: header parsing and ID3v2 metadata.

Audio payload bytes are never rewritten when editing tags.

Re-exports§

pub use self;

Structs§

DsfHeader
The fixed-size DSF header: DSD chunk, fmt chunk and data chunk header.
FrameId
A validated ID3v2 text-frame identifier (T???, excluding TXXX).
Picture
A front-cover image to embed (APIC).
Tag
Re-exported so callers use exactly the id3 version this crate was built with. An ID3 tag containing zero or more Frames.
TagEdit
A set of per-frame changes. Frames not mentioned are preserved.
Track
A track’s place on its disc: number and, if known, how many tracks there are.
WriteOptions
Options for tag writes.

Enums§

Change
What to do with a single frame.
Error
Errors produced by this crate.
Field
A well-known field of a track’s tag.
Target
The kind of frame a Field is stored in.
Version
Re-exported so callers use exactly the id3 version this crate was built with. Denotes the version of a tag.

Constants§

AUDIO_OFFSET
Offset of the first audio byte in a DSF file (92).
DATA_CHUNK_HEADER_LEN
Size of the data chunk header, which data_chunk_size counts along with the audio.

Traits§

Storage
A seekable, resizable byte store: a File or an in-memory buffer.

Functions§

custom_fields
The user-defined text frames (TXXX) as (description, value) pairs.
read_path
Convenience: read the tag from a path.
read_tag
Reads the ID3v2 tag, or None if the file has none.
read_track
The track position from the TRCK frame, if present and well formed.
remove_tag
Removes the tag and zeroes the metadata pointer.
text
The text of frame id, with multiple values joined by "; ". None if absent.
text_frames
Every text frame in the tag (except user-defined TXXX frames), in tag order.
update_path
Convenience: apply edit to the file at path.
update_tag
Applies edit to the existing tag (creating one if absent), preserving all other frames.
write_tag
Replaces the whole tag.

Type Aliases§

Result
Crate-wide result alias.