pub enum ReadOutcome {
Frames {
count: NonZeroUsize,
position: Duration,
},
Pending {
reason: PendingReason,
position: Duration,
},
Eof {
position: Duration,
},
}Expand description
Result of a PCM read.
Each variant carries distinct caller semantics — the type system
guarantees forward progress in Frames (via NonZeroUsize),
while non-progress is explicit in Pending with a typed
PendingReason. Failures surface as Err(DecodeError), never
as an enum variant.
Variants§
Frames
count frames were written into the output buffer (count > 0
by construction). position is the reader’s position
after the read.
Pending
Reader is alive but produced no frames this call. See
PendingReason for the precise cause and required caller
action. position is the reader’s current position (it has
not advanced since the last successful read).
Eof
Natural end of stream — the reader played up to duration().
No more frames will be produced. position is the final
position (usually duration()).
Trait Implementations§
Source§impl Clone for ReadOutcome
impl Clone for ReadOutcome
Source§fn clone(&self) -> ReadOutcome
fn clone(&self) -> ReadOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReadOutcome
impl Debug for ReadOutcome
Source§impl PartialEq for ReadOutcome
impl PartialEq for ReadOutcome
Source§fn eq(&self, other: &ReadOutcome) -> bool
fn eq(&self, other: &ReadOutcome) -> bool
self and other values to be equal, and is used by ==.