Skip to main content

Track

Struct Track 

Source
pub struct Track {
    pub number: u32,
    pub start_ts: u64,
    pub end_ts: u64,
    pub tags: Vec<Tag>,
    pub visuals: Vec<Visual>,
    /* private fields */
}
Expand description

Metadata identifying a track in a FLAC file that has an embedded CUE sheet.

Fields§

§number: u32§start_ts: u64§end_ts: u64§tags: Vec<Tag>§visuals: Vec<Visual>

Implementations§

Source§

impl Track

Source

pub fn from_tags( streaminfo: &StreamInfo, cue: &Cue, end_ts: u64, tags: &[Tag], visuals: &[Visual], ) -> Self

Create a Track from a file’s embedded FLAC&vorbis comments and CUE sheet.

Source

pub fn tag_value(&self, name: &str) -> Option<&Value>

Return the tag value for a given tag name.

Source

pub fn pathname(&self) -> PathBuf

Return the output pathname for a track.

Source

pub fn write_metadata<S: Write>( &self, total_samples: u64, metadata_padding: u32, to: S, ) -> Result<()>

Write a track’s STREAM metadata blocks - first STREAMINFO, then the remainder containing pictures and vorbis comments.

Source

pub fn write_audio<S: Write>(&self, from: &mut FlacReader, to: S) -> Result<u64>

Write a STREAM’s FRAME sequence, containing compressed audio samples. Returns the number of samples actually processed.

Trait Implementations§

Source§

impl Clone for Track

Source§

fn clone(&self) -> Track

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Track

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Track

§

impl RefUnwindSafe for Track

§

impl Send for Track

§

impl Sync for Track

§

impl Unpin for Track

§

impl UnsafeUnpin for Track

§

impl UnwindSafe for Track

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Extend<T> for T

Source§

fn extend(self) -> T

Extends this type
Source§

impl<T> Extended for T

Source§

fn extended<T>(self) -> T
where Self: Extend<T>,

Extends this type
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> SignExtend<T> for T

Source§

fn sign_extend(self) -> T

Sign extends this type
Source§

impl<T> SignExtended for T

Source§

fn sign_extended<T>(self) -> T
where Self: SignExtend<T>,

Sign extends this type
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> Truncate<T> for T

Source§

fn truncate(self) -> T

Performs the truncation
Source§

impl<T> Truncated for T

Source§

fn truncated<T>(self) -> T
where Self: Truncate<T>,

Truncates this type
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ZeroExtend<T> for T

Source§

fn zero_extend(self) -> T

Zero extends this type
Source§

impl<T> ZeroExtended for T

Source§

fn zero_extended<T>(self) -> T
where Self: ZeroExtend<T>,

Zero extends this type