pub trait MetadataFields {
// Required methods
fn title(&self) -> &str;
fn author(&self) -> &str;
fn format(&self) -> &str;
// Provided methods
fn comments(&self) -> &str { ... }
fn frame_count(&self) -> Option<usize> { ... }
fn frame_rate(&self) -> u32 { ... }
fn duration_seconds(&self) -> Option<f32> { ... }
fn loop_frame(&self) -> Option<usize> { ... }
}Expand description
Unified metadata trait for chiptune playback.
Implementations of this trait provide a common interface to access song metadata regardless of the underlying file format.
Required Methods§
Get the author/composer name.
Provided Methods§
Sourcefn comments(&self) -> &str
fn comments(&self) -> &str
Get additional comments or description.
Returns an empty string if no comments are available.
Sourcefn frame_count(&self) -> Option<usize>
fn frame_count(&self) -> Option<usize>
Get the total frame count, if known.
Sourcefn frame_rate(&self) -> u32
fn frame_rate(&self) -> u32
Get the playback frame rate in Hz.
Typical values: 50 (PAL) or 60 (NTSC).
Sourcefn duration_seconds(&self) -> Option<f32>
fn duration_seconds(&self) -> Option<f32>
Get the song duration in seconds, if known.
Sourcefn loop_frame(&self) -> Option<usize>
fn loop_frame(&self) -> Option<usize>
Get the loop start frame, if the song loops.