pub struct Attachment {
pub name: String,
pub mime: Option<String>,
pub description: Option<String>,
pub data: Vec<u8>,
}Expand description
One file-shaped payload attached to a container.
Distinct from AttachedPicture: an
Attachment is an arbitrary byte blob with a filename — fonts
(MKV application/x-truetype-font), thumbnail strips, subtitle
fragments, README text — whereas AttachedPicture is the
ID3v2/FLAC/MP4 cover-art pathway that carries a typed
PictureType. MKV Attachments map
cleanly onto this struct; MP4 meta boxes and Ogg
METADATA_BLOCK_PICTURE are emitted as
attached_pictures instead.
Fields§
§name: StringOriginal filename as stored in the container (no path
stripping, no normalisation). Containers that don’t track a
name still populate this — synthesise something stable like
attachment_<id>.bin so callers always have a routing handle.
mime: Option<String>IANA media type ("image/png", "application/x-truetype-font",
…) when the container declares one. None means “unspecified”
— callers are free to sniff the bytes.
description: Option<String>Free-form description supplied by the tagger.
data: Vec<u8>Raw attachment bytes exactly as stored in the container.
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more