pub enum UsbtmcError {
Endpoint(EndpointError),
InvalidTag,
PacketTooShort,
UnexpectedMsgId(u8),
BufferTooSmall,
MessageTruncated,
NotConnected,
}Expand description
Errors that can occur during USBTMC communication.
Variants§
Endpoint(EndpointError)
USB endpoint communication error.
InvalidTag
Invalid header tag (bTag == 0 or bTagInverse != !bTag).
PacketTooShort
Packet was shorter than the expected header size.
UnexpectedMsgId(u8)
Unexpected message ID received.
BufferTooSmall
User buffer was too small to hold the message payload.
MessageTruncated
The message transfer was truncated or ended early.
NotConnected
Device is disconnected or endpoint is disabled.
Trait Implementations§
Source§impl Clone for UsbtmcError
impl Clone for UsbtmcError
impl Copy for UsbtmcError
Source§impl Debug for UsbtmcError
impl Debug for UsbtmcError
Source§impl Display for UsbtmcError
impl Display for UsbtmcError
impl Eq for UsbtmcError
Source§impl Error for UsbtmcError
impl Error for UsbtmcError
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 Format for UsbtmcErrorwhere
EndpointError: Format,
impl Format for UsbtmcErrorwhere
EndpointError: Format,
Source§impl From<EndpointDisabledError> for UsbtmcError
impl From<EndpointDisabledError> for UsbtmcError
Source§fn from(e: EndpointDisabledError) -> Self
fn from(e: EndpointDisabledError) -> Self
Converts to this type from the input type.
Source§impl From<EndpointError> for UsbtmcError
impl From<EndpointError> for UsbtmcError
Source§fn from(e: EndpointError) -> Self
fn from(e: EndpointError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UsbtmcError
impl PartialEq for UsbtmcError
impl StructuralPartialEq for UsbtmcError
Auto Trait Implementations§
impl Forget for UsbtmcError
impl Freeze for UsbtmcError
impl Move for UsbtmcError
impl RefUnwindSafe for UsbtmcError
impl Send for UsbtmcError
impl Sync for UsbtmcError
impl Unpin for UsbtmcError
impl UnsafeUnpin for UsbtmcError
impl UnwindSafe for UsbtmcError
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