[−][src]Struct puremp3::Mp3Decoder
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 Frame
s.
Each Frame
contains header information and the decoded samples.
Any invalid data is skipped. The iterator will provide Frame
s 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,
R: Send,
impl<R> Sync for Mp3Decoder<R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,