pub enum DecoderState {
Decoding {
remaining_samples: NonZeroU32,
},
Finished,
Failed,
}Expand description
The mutually exclusive states of a complete-file decoder.
Returned by SliceDecoder::state and the standard I/O decoder’s state method.
A decoding stream always has samples remaining. Finished is reached only
after validating the end marker; Failed cannot resume decoding.
Variants§
Decoding
More declared PCM remains to be decoded.
Fields
§
remaining_samples: NonZeroU32Mono PCM16 samples still to be returned, including the next block.
Finished
All declared samples and the end marker were successfully decoded.
Failed
An error invalidated the stream. Construct a new decoder to restart.
Trait Implementations§
Source§impl Clone for DecoderState
impl Clone for DecoderState
Source§fn clone(&self) -> DecoderState
fn clone(&self) -> DecoderState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecoderState
Source§impl Debug for DecoderState
impl Debug for DecoderState
impl Eq for DecoderState
Source§impl PartialEq for DecoderState
impl PartialEq for DecoderState
impl StructuralPartialEq for DecoderState
Auto Trait Implementations§
impl Freeze for DecoderState
impl RefUnwindSafe for DecoderState
impl Send for DecoderState
impl Sync for DecoderState
impl Unpin for DecoderState
impl UnsafeUnpin for DecoderState
impl UnwindSafe for DecoderState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more