pub enum ProtocolVersion {
MQTT3,
MQTT5,
}
Expand description
Represents supported MQTT protocol versions
Variants§
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
Returns a duplicate 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 ProtocolVersion
impl Debug for ProtocolVersion
Source§impl Encoder<ProtocolVersion> for VersionCodec
impl Encoder<ProtocolVersion> for VersionCodec
Source§fn encode(
&mut self,
_: ProtocolVersion,
_: &mut BytesMut,
) -> Result<(), Self::Error>
fn encode( &mut self, _: ProtocolVersion, _: &mut BytesMut, ) -> Result<(), Self::Error>
Encoding not supported for version detection codec
This codec is only used for initial protocol detection, actual packet encoding should be handled by version-specific codecs
Source§type Error = EncodeError
type Error = EncodeError
The type of encoding errors. Read more
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
impl Copy for ProtocolVersion
impl Eq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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