pub enum MtpSessionError {
Init,
Process,
BadSeqId {
seq_id: i32,
n_seq: u32,
},
InvalidConfig(&'static str),
}Expand description
Errors raised by the MTP draft session.
Variants§
Init
Returned when mtp_session_new fails (typically: model lacks MTP heads,
or one of the contexts is incompatible).
Process
mtp_session_process returned false.
BadSeqId
Caller passed a sequence id outside [0, n_seq).
InvalidConfig(&'static str)
Invalid session configuration (e.g. n_draft_max <= 0).
Trait Implementations§
Source§impl Debug for MtpSessionError
impl Debug for MtpSessionError
Source§impl Display for MtpSessionError
impl Display for MtpSessionError
Source§impl Error for MtpSessionError
impl Error for MtpSessionError
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()
Auto Trait Implementations§
impl Freeze for MtpSessionError
impl RefUnwindSafe for MtpSessionError
impl Send for MtpSessionError
impl Sync for MtpSessionError
impl Unpin for MtpSessionError
impl UnsafeUnpin for MtpSessionError
impl UnwindSafe for MtpSessionError
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