pub enum SizeError {
ChannelsContainer {
actual: usize,
required: usize,
},
FramesContainer {
actual: usize,
required: usize,
},
ChannelBuffer {
index: usize,
actual: usize,
required: usize,
},
FrameBuffer {
index: usize,
actual: usize,
required: usize,
},
Total {
actual: usize,
required: usize,
},
Mask {
actual: usize,
required: usize,
},
}Expand description
Error returned when the wrapped data structure has the wrong dimensions, typically that it is too short.
Variants§
ChannelsContainer
The outer container in a sequential nested layout has too few channel buffers.
This applies to structures like &[Vec<T>] or &[&[T]] used as
channel-major data, where each outer element represents one channel.
FramesContainer
The outer container in an interleaved nested layout has too few frame buffers.
This applies to structures like &[Vec<T>] or &[&[T]] used as
frame-major data, where each outer element represents one frame.
ChannelBuffer
An inner channel buffer is too short for the requested frame count.
index identifies which channel buffer failed the length check.
FrameBuffer
An inner frame buffer is too short for the requested channel count.
index identifies which frame buffer failed the length check.
Total
A flat (non-nested) sample buffer is too short for the requested dimensions.
This is used for adapters backed by a single contiguous slice/vector where
the required length is computed from channels * frames (and possibly an
additional per-sample element factor for raw byte/sample representations).
actual is the provided flat buffer length and required is the minimum
length needed for the requested adapter shape.
Mask
A channel-activity mask has an invalid length.
This applies to sparse sequential adapters where the mask must contain one boolean entry per channel.
actual is the provided mask length and required is the channel count.
Trait Implementations§
Source§impl Error for SizeError
impl Error for SizeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()