[][src]Struct puremp3::Mp3Decoder

pub struct Mp3Decoder<R: Read> { /* fields omitted */ }

Decodes MP3 streams.

Methods

impl<R: Read> Mp3Decoder<R>[src]

pub fn new(reader: R) -> Self[src]

Creates a new MP3Decoder from the given reader.

pub fn get_ref(&self) -> &R[src]

Gets a reference to the underlying reader.

pub fn get_mut(&mut self) -> &mut R[src]

Gets a mutable reference to the underlying reader.

It is inadvisable to directly read from the underlying reader.

pub fn into_inner(self) -> R[src]

Unwraps the Mp3Decoder, returning the underlying reader.

pub fn frames(self) -> impl Iterator<Item = Frame>[src]

Returns an Iterator that yields MP3 Frames.

Each Frame contains header information and the decoded samples. Any invalid data is skipped. The iterator will provide Frames until there is no more valid MP3 data or an error occurs.

If you wish to inspect any errors, Use next_frame instead.

pub fn next_frame(&mut self) -> Result<Frame, Error>[src]

Decodes the next MP3 Frame in the stream.

Data is read until a valid Frame is found. Invalid data is skipped. Other errors are returned.

Auto Trait Implementations

impl<R> Send for Mp3Decoder<R> where
    R: Send

impl<R> Sync for Mp3Decoder<R> where
    R: Sync

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]