pub enum ProtocolError {
Decode(DecodeError),
Encode(EncodeError),
ProtocolViolation(ProtocolViolationError),
KeepAliveTimeout,
ReadTimeout,
}
Expand description
Protocol level errors
Variants§
Decode(DecodeError)
MQTT decoding error
Encode(EncodeError)
MQTT encoding error
ProtocolViolation(ProtocolViolationError)
Peer violated MQTT protocol specification
KeepAliveTimeout
Keep alive timeout
ReadTimeout
Read frame timeout
Implementations§
source§impl ProtocolError
impl ProtocolError
pub fn generic_violation(message: &'static str) -> Self
Trait Implementations§
source§impl Clone for ProtocolError
impl Clone for ProtocolError
source§fn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtocolError
impl Debug for ProtocolError
source§impl Display for ProtocolError
impl Display for ProtocolError
source§impl Error for ProtocolError
impl Error for ProtocolError
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<DecodeError> for ProtocolError
impl From<DecodeError> for ProtocolError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
source§impl From<EncodeError> for ProtocolError
impl From<EncodeError> for ProtocolError
source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
source§impl<T: Debug> From<ProtocolError> for ClientError<T>
impl<T: Debug> From<ProtocolError> for ClientError<T>
source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
source§impl<E> From<ProtocolError> for HandshakeError<E>
impl<E> From<ProtocolError> for HandshakeError<E>
source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
source§impl From<ProtocolViolationError> for ProtocolError
impl From<ProtocolViolationError> for ProtocolError
source§fn from(source: ProtocolViolationError) -> Self
fn from(source: ProtocolViolationError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ProtocolError
impl PartialEq for ProtocolError
impl Copy for ProtocolError
impl Eq for ProtocolError
impl StructuralPartialEq for ProtocolError
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)