pub enum MidiError {
Transfer(PipeError),
NoInterface,
NoEndpoint,
WrongDirection,
NoPipe,
Descriptor(MidiDescriptorError),
UnsupportedTopology,
InvalidPort,
InvalidMessage(MidiPacketError),
InvalidPacketLength,
}Expand description
USB MIDI host error.
Variants§
Transfer(PipeError)
A USB transfer failed.
NoInterface
No MIDIStreaming interface was found.
NoEndpoint
The requested transfer direction is not exposed by the interface.
WrongDirection
An endpoint was opened using the wrong transfer direction.
NoPipe
The controller could not allocate an endpoint pipe.
Descriptor(MidiDescriptorError)
The MIDI descriptors are malformed or exceed a fixed capacity.
UnsupportedTopology
The device uses a topology unsupported by the friendly host API.
InvalidPort
A port does not belong to this MIDI device direction.
InvalidMessage(MidiPacketError)
A MIDI message could not be encoded as an event packet.
InvalidPacketLength
USB-MIDI transfers must contain complete four-byte event packets.
Trait Implementations§
Source§impl Error for MidiError
impl Error for MidiError
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 From<MidiDescriptorError> for MidiError
impl From<MidiDescriptorError> for MidiError
Source§fn from(error: MidiDescriptorError) -> Self
fn from(error: MidiDescriptorError) -> Self
Converts to this type from the input type.
Source§impl From<MidiPacketError> for MidiError
impl From<MidiPacketError> for MidiError
Source§fn from(error: MidiPacketError) -> Self
fn from(error: MidiPacketError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MidiError
impl RefUnwindSafe for MidiError
impl Send for MidiError
impl Sync for MidiError
impl Unpin for MidiError
impl UnsafeUnpin for MidiError
impl UnwindSafe for MidiError
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