Enum ExactOutputError

Source
pub enum ExactOutputError {
    InvalidOutputFormat,
    InvalidEffectivePrecision(u32),
    UnknownEffectivePrecision,
    RateMismatch {
        source: u32,
        output: u32,
    },
    LayoutMismatch {
        source: ChannelLayout,
        output: ChannelLayout,
    },
    InsufficientPrecision {
        source: u32,
        output: u32,
    },
    IncompleteFrame,
    BlockTooLarge,
    SampleOutOfRange {
        index: usize,
        sample: i32,
        bits: u32,
    },
    Allocation(TryReserveError),
}
Expand description

A refusal to represent source samples exactly in a selected output format.

Variants§

§

InvalidOutputFormat

Rate or channel positions are invalid or unknown.

§

InvalidEffectivePrecision(u32)

Claimed effective precision is invalid for its representation.

§

UnknownEffectivePrecision

The downstream precision has not been established by the caller.

§

RateMismatch

Exact output cannot resample to another rate.

Fields

§source: u32

Original source frames per second.

§output: u32

Selected output frames per second.

§

LayoutMismatch

Exact output cannot mix or remap source speaker positions.

Fields

§source: ChannelLayout

Original source speaker positions and interleaved order.

§output: ChannelLayout

Selected output speaker positions and interleaved order.

§

InsufficientPrecision

The representation or downstream precision would discard source bits.

Fields

§source: u32

Original signed-PCM valid bit depth.

§output: u32

Available effective precision after representation constraints.

§

IncompleteFrame

A source block ends inside an interleaved frame.

§

BlockTooLarge

A source block exceeds the bounded encoding operation.

§

SampleOutOfRange

A canonical source integer is outside its declared valid-bit range.

Fields

§index: usize

Zero-based interleaved sample position in the submitted block.

§sample: i32

Invalid canonical source integer.

§bits: u32

Declared signed-PCM valid bit depth.

§

Allocation(TryReserveError)

The caller’s encoded buffer cannot reserve the needed capacity.

Trait Implementations§

Source§

impl Debug for ExactOutputError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ExactOutputError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ExactOutputError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ExactOutputError> for ExactSessionError

Source§

fn from(error: ExactOutputError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,