Skip to main content

Toc

Struct Toc 

Source
pub struct Toc {
    pub first_track: u8,
    pub last_track: u8,
    pub tracks: Vec<Track>,
    pub leadout_lba: u32,
}
Expand description

Table of Contents, read directly from the Audio CD. The most important part is the tracks vector, which allows you to read raw track data.

Fields§

§first_track: u8

Helper value with the first track number

§last_track: u8

Helper value with the last track number. You should not use it directly to iterate over all available tracks, as there might be gaps.

§tracks: Vec<Track>

List of tracks with LBA and MSF offsets

§leadout_lba: u32

Lead-out LBA reported by the drive for the disc TOC. You’ll also need this in order to calculate MusicBrainz ID.

Trait Implementations§

Source§

impl Debug for Toc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Toc

§

impl RefUnwindSafe for Toc

§

impl Send for Toc

§

impl Sync for Toc

§

impl Unpin for Toc

§

impl UnsafeUnpin for Toc

§

impl UnwindSafe for Toc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.