pub(crate) enum SetParamsError {
InvalidChannels {
channels: u8,
min: u8,
max: u8,
},
UnsupportedFormat {
format: u8,
},
UnsupportedRate {
rate: u8,
},
UnsupportedFeatures {
features: u32,
},
ZeroPeriodBytes,
ZeroBufferBytes,
BufferSmallerThanPeriod {
buffer_bytes: usize,
period_bytes: usize,
},
BufferNotPeriodMultiple {
buffer_bytes: usize,
period_bytes: usize,
},
}Expand description
Error returned when VIRTIO_SND_R_PCM_SET_PARAMS contains invalid or unsupported parameters.
Variants§
InvalidChannels
UnsupportedFormat
UnsupportedRate
UnsupportedFeatures
ZeroPeriodBytes
ZeroBufferBytes
BufferSmallerThanPeriod
BufferNotPeriodMultiple
Implementations§
Source§impl SetParamsError
impl SetParamsError
Sourcepub fn status_code(&self) -> u32
pub fn status_code(&self) -> u32
Maps the error to the corresponding Virtio Sound specification status code.
Trait Implementations§
Source§impl Debug for SetParamsError
impl Debug for SetParamsError
Source§impl Display for SetParamsError
impl Display for SetParamsError
Source§impl Error for SetParamsError
impl Error for SetParamsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for SetParamsError
impl PartialEq for SetParamsError
impl Eq for SetParamsError
impl StructuralPartialEq for SetParamsError
Auto Trait Implementations§
impl Freeze for SetParamsError
impl RefUnwindSafe for SetParamsError
impl Send for SetParamsError
impl Sync for SetParamsError
impl Unpin for SetParamsError
impl UnwindSafe for SetParamsError
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