1#[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
3pub enum ResampleError {
4 InvalidInputBufferSize,
6 InvalidOutputBufferSize,
8}
9
10impl core::fmt::Display for ResampleError {
11 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12 match self {
13 Self::InvalidInputBufferSize => "Input buffer size is invalid".fmt(f),
14 Self::InvalidOutputBufferSize => "Output buffer size is invalid".fmt(f),
15 }
16 }
17}
18
19impl core::fmt::Debug for ResampleError {
20 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
21 core::fmt::Display::fmt(&self, f)
22 }
23}
24
25#[cfg(not(feature = "no_std"))]
26impl std::error::Error for ResampleError {}