Struct rmp3::DecoderOwned [−][src]
This is supported on crate feature
std
only.Implementations
impl DecoderOwned<Vec<u8>>
[src]
pub fn new<T>(source: T) -> Self where
T: Into<Vec<u8>>,
[src]
T: Into<Vec<u8>>,
Constructs a new DecoderBox
for processing MPEG Audio.
impl<T> DecoderOwned<T>
[src]
pub fn into_inner(self) -> T
[src]
Consumes the DecoderBox
, returning the owned data.
pub fn next<'a>(&'a mut self) -> Option<Frame<'a, 'a>>
[src]
Reads the next frame, skipping over potential garbage data.
pub fn peek<'a>(&'a mut self) -> Option<Frame<'a, 'static>>
[src]
Reads the next frame without decoding it, or advancing the decoder.
Use skip
to advance.
This means that the samples will always be empty in Audio
,
and sample_count
should be used to inspect the length.
pub fn position(&self) -> usize
[src]
Gets the current position in the input data, starting from 0.
pub fn set_position(&mut self, position: usize)
[src]
Sets the current position in the input data.
If position
is out of bounds, it's set to the end of the data instead.
pub fn skip(&mut self) -> Option<()>
[src]
Skips the current frame the decoder is over, if any.
Trait Implementations
impl<T: AsRef<[u8]>> From<Arc<T>> for DecoderOwned<Arc<T>>
[src]
impl<T: AsRef<[u8]>> From<Rc<T>> for DecoderOwned<Rc<T>>
[src]
impl<T: Into<Vec<u8>>> From<T> for DecoderOwned<Vec<u8>>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for DecoderOwned<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for DecoderOwned<T> where
T: Send,
T: Send,
impl<T> Sync for DecoderOwned<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DecoderOwned<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for DecoderOwned<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,