Enum mqttrs::Error [−][src]
pub enum Error { WriteZero, InvalidPid, InvalidQos(u8), InvalidConnectReturnCode(u8), InvalidProtocol(String, u8), InvalidHeader, InvalidLength, InvalidString(Utf8Error), IoError(ErrorKind, String), }
Variants
Not enough space in the write buffer.
It is the caller’s responsiblity to pass a big enough buffer to encode()
.
Tried to encode or decode a ProcessIdentifier==0.
InvalidQos(u8)
Tried to decode a QoS > 2.
InvalidConnectReturnCode(u8)
Tried to decode a ConnectReturnCode > 5.
Tried to decode an unknown protocol.
Tried to decode an invalid fixed header (packet type, flags, or remaining_length).
Trying to encode/decode an invalid length.
The difference with WriteZero
/UnexpectedEof
is that it refers to an invalid/corrupt
length rather than a buffer size issue.
InvalidString(Utf8Error)
Trying to decode a non-utf8 string.
Catch-all error when converting from std::io::Error
.
Note: Only available when std is available. You’ll hopefully never see this.
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl Eq for Error
[src]
impl StructuralEq for Error
[src]
impl StructuralPartialEq for Error
[src]
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more