pub enum OpError {
Nak {
what: &'static str,
index: Option<u16>,
},
Device {
code: u8,
what: &'static str,
index: Option<u16>,
},
Timeout {
what: &'static str,
index: Option<u16>,
},
BadData {
what: &'static str,
error: String,
},
Cancelled,
}Expand description
Why an op failed. what names the step (“program write”) and index
its slot, when it has one.
Variants§
Nak
The synth refused the step.
Device
The synth answered with an error code.
Fields
Timeout
The step’s reply did not come before its timeout.
BadData
The reply came, but its data is wrong.
Cancelled
The op was dropped before it ended (e.g. its synth was unplugged).
Trait Implementations§
impl Eq for OpError
Source§impl Error for OpError
impl Error for OpError
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()
impl StructuralPartialEq for OpError
Auto Trait Implementations§
impl Freeze for OpError
impl RefUnwindSafe for OpError
impl Send for OpError
impl Sync for OpError
impl Unpin for OpError
impl UnsafeUnpin for OpError
impl UnwindSafe for OpError
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