Enum GenericPacket

Source
pub enum GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,
{
Show 29 variants V3_1_1Connect(Connect), V3_1_1Connack(Connack), V3_1_1Subscribe(GenericSubscribe<PacketIdType>), V3_1_1Suback(GenericSuback<PacketIdType>), V3_1_1Unsubscribe(GenericUnsubscribe<PacketIdType>), V3_1_1Unsuback(GenericUnsuback<PacketIdType>), V3_1_1Publish(GenericPublish<PacketIdType>), V3_1_1Puback(GenericPuback<PacketIdType>), V3_1_1Pubrec(GenericPubrec<PacketIdType>), V3_1_1Pubrel(GenericPubrel<PacketIdType>), V3_1_1Pubcomp(GenericPubcomp<PacketIdType>), V3_1_1Disconnect(Disconnect), V3_1_1Pingreq(Pingreq), V3_1_1Pingresp(Pingresp), V5_0Connect(Connect), V5_0Connack(Connack), V5_0Subscribe(GenericSubscribe<PacketIdType>), V5_0Suback(GenericSuback<PacketIdType>), V5_0Unsubscribe(GenericUnsubscribe<PacketIdType>), V5_0Unsuback(GenericUnsuback<PacketIdType>), V5_0Publish(GenericPublish<PacketIdType>), V5_0Puback(GenericPuback<PacketIdType>), V5_0Pubrec(GenericPubrec<PacketIdType>), V5_0Pubrel(GenericPubrel<PacketIdType>), V5_0Pubcomp(GenericPubcomp<PacketIdType>), V5_0Disconnect(Disconnect), V5_0Pingreq(Pingreq), V5_0Pingresp(Pingresp), V5_0Auth(Auth),
}

Variants§

§

V3_1_1Connect(Connect)

§

V3_1_1Connack(Connack)

§

V3_1_1Subscribe(GenericSubscribe<PacketIdType>)

§

V3_1_1Suback(GenericSuback<PacketIdType>)

§

V3_1_1Unsubscribe(GenericUnsubscribe<PacketIdType>)

§

V3_1_1Unsuback(GenericUnsuback<PacketIdType>)

§

V3_1_1Publish(GenericPublish<PacketIdType>)

§

V3_1_1Puback(GenericPuback<PacketIdType>)

§

V3_1_1Pubrec(GenericPubrec<PacketIdType>)

§

V3_1_1Pubrel(GenericPubrel<PacketIdType>)

§

V3_1_1Pubcomp(GenericPubcomp<PacketIdType>)

§

V3_1_1Disconnect(Disconnect)

§

V3_1_1Pingreq(Pingreq)

§

V3_1_1Pingresp(Pingresp)

§

V5_0Connect(Connect)

§

V5_0Connack(Connack)

§

V5_0Subscribe(GenericSubscribe<PacketIdType>)

§

V5_0Suback(GenericSuback<PacketIdType>)

§

V5_0Unsubscribe(GenericUnsubscribe<PacketIdType>)

§

V5_0Unsuback(GenericUnsuback<PacketIdType>)

§

V5_0Publish(GenericPublish<PacketIdType>)

§

V5_0Puback(GenericPuback<PacketIdType>)

§

V5_0Pubrec(GenericPubrec<PacketIdType>)

§

V5_0Pubrel(GenericPubrel<PacketIdType>)

§

V5_0Pubcomp(GenericPubcomp<PacketIdType>)

§

V5_0Disconnect(Disconnect)

§

V5_0Pingreq(Pingreq)

§

V5_0Pingresp(Pingresp)

§

V5_0Auth(Auth)

Implementations§

Source§

impl<PacketIdType> GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source

pub fn packet_type(&self) -> PacketType

Get the packet type

Source

pub fn protocol_version(&self) -> Version

Get the MQTT protocol version of this packet

Trait Implementations§

Source§

impl<PacketIdType> Clone for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize + Clone,

Source§

fn clone(&self) -> GenericPacket<PacketIdType>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<PacketIdType> Debug for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<PacketIdType> Display for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<PacketIdType> From<Auth> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Auth) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Connack> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Connack) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Connack> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Connack) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Connect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Connect) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Connect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Connect) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Disconnect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Disconnect) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Disconnect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Disconnect) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubcomp<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubcomp<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubcomp<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubcomp<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPublish<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPublish<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPublish<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPublish<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubrec<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubrec<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubrec<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubrec<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubrel<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubrel<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericPubrel<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericPubrel<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericStorePacket<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(store_packet: GenericStorePacket<PacketIdType>) -> Self

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericSuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericSuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericSuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericSuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericSubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericSubscribe<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericSubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericSubscribe<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericUnsuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericUnsuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericUnsuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericUnsuback<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericUnsubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericUnsubscribe<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<GenericUnsubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: GenericUnsubscribe<PacketIdType>) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Pingreq> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Pingreq) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Pingreq> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Pingreq) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Pingresp> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Pingresp) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> From<Pingresp> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn from(v: Pingresp) -> GenericPacket<PacketIdType>

Converts to this type from the input type.
Source§

impl<PacketIdType> GenericPacketDisplay for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn fmt_debug(&self, __enum_dispatch_arg_0: &mut Formatter<'_>) -> Result

Source§

fn fmt_display(&self, __enum_dispatch_arg_0: &mut Formatter<'_>) -> Result

Source§

impl<PacketIdType> GenericPacketTrait for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

fn size(&self) -> usize

Source§

fn to_buffers(&self) -> Vec<IoSlice<'_>>

Source§

impl<PacketIdType> PacketKind for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

PacketKind implementation for GenericPacket enum

For enum types, all flags are false at compile time since the actual packet type is determined at runtime. This implementation provides a fallback for generic packet handling where compile-time type information is not available.

Source§

const IS_CONNECT: bool = false

true if this is a CONNECT packet
Source§

const IS_CONNACK: bool = false

true if this is a CONNACK packet
Source§

const IS_PUBLISH: bool = false

true if this is a PUBLISH packet
Source§

const IS_PUBACK: bool = false

true if this is a PUBACK packet
Source§

const IS_PUBREC: bool = false

true if this is a PUBREC packet
Source§

const IS_PUBREL: bool = false

true if this is a PUBREL packet
Source§

const IS_PUBCOMP: bool = false

true if this is a PUBCOMP packet
Source§

const IS_SUBSCRIBE: bool = false

true if this is a SUBSCRIBE packet
Source§

const IS_SUBACK: bool = false

true if this is a SUBACK packet
Source§

const IS_UNSUBSCRIBE: bool = false

true if this is an UNSUBSCRIBE packet
Source§

const IS_UNSUBACK: bool = false

true if this is an UNSUBACK packet
Source§

const IS_PINGREQ: bool = false

true if this is a PINGREQ packet
Source§

const IS_PINGRESP: bool = false

true if this is a PINGRESP packet
Source§

const IS_DISCONNECT: bool = false

true if this is a DISCONNECT packet
Source§

const IS_AUTH: bool = false

true if this is an AUTH packet (v5.0 only)
Source§

const IS_V3_1_1: bool = false

true if this is an MQTT v3.1.1 packet
Source§

const IS_V5_0: bool = false

true if this is an MQTT v5.0 packet
Source§

impl<PacketIdType> PartialEq for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize + PartialEq,

Source§

fn eq(&self, other: &GenericPacket<PacketIdType>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<PacketIdType> Sendable<Any, PacketIdType> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId,

Source§

fn dispatch_send( self, connection: &mut GenericConnection<Any, PacketIdType>, ) -> Vec<GenericEvent<PacketIdType>>

Source§

impl<PacketIdType> Sendable<Client, PacketIdType> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId,

Source§

fn dispatch_send( self, connection: &mut GenericConnection<Client, PacketIdType>, ) -> Vec<GenericEvent<PacketIdType>>

Source§

impl<PacketIdType> Sendable<Server, PacketIdType> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId,

Source§

fn dispatch_send( self, connection: &mut GenericConnection<Server, PacketIdType>, ) -> Vec<GenericEvent<PacketIdType>>

Source§

impl<PacketIdType> Serialize for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize + Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<PacketIdType> TryInto<Auth> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Auth, <Self as TryInto<Auth>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Connack> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Connack, <Self as TryInto<Connack>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Connack> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Connack, <Self as TryInto<Connack>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Connect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Connect, <Self as TryInto<Connect>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Connect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Connect, <Self as TryInto<Connect>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Disconnect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Disconnect, <Self as TryInto<Disconnect>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Disconnect> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Disconnect, <Self as TryInto<Disconnect>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPuback<PacketIdType>, <Self as TryInto<GenericPuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPuback<PacketIdType>, <Self as TryInto<GenericPuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubcomp<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubcomp<PacketIdType>, <Self as TryInto<GenericPubcomp<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubcomp<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubcomp<PacketIdType>, <Self as TryInto<GenericPubcomp<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPublish<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPublish<PacketIdType>, <Self as TryInto<GenericPublish<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPublish<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPublish<PacketIdType>, <Self as TryInto<GenericPublish<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubrec<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubrec<PacketIdType>, <Self as TryInto<GenericPubrec<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubrec<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubrec<PacketIdType>, <Self as TryInto<GenericPubrec<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubrel<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubrel<PacketIdType>, <Self as TryInto<GenericPubrel<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericPubrel<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericPubrel<PacketIdType>, <Self as TryInto<GenericPubrel<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericSuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericSuback<PacketIdType>, <Self as TryInto<GenericSuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericSuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericSuback<PacketIdType>, <Self as TryInto<GenericSuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericSubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericSubscribe<PacketIdType>, <Self as TryInto<GenericSubscribe<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericSubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericSubscribe<PacketIdType>, <Self as TryInto<GenericSubscribe<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericUnsuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericUnsuback<PacketIdType>, <Self as TryInto<GenericUnsuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericUnsuback<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericUnsuback<PacketIdType>, <Self as TryInto<GenericUnsuback<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericUnsubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericUnsubscribe<PacketIdType>, <Self as TryInto<GenericUnsubscribe<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<GenericUnsubscribe<PacketIdType>> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<GenericUnsubscribe<PacketIdType>, <Self as TryInto<GenericUnsubscribe<PacketIdType>>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Pingreq> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Pingreq, <Self as TryInto<Pingreq>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Pingreq> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Pingreq, <Self as TryInto<Pingreq>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Pingresp> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Pingresp, <Self as TryInto<Pingresp>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> TryInto<Pingresp> for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Pingresp, <Self as TryInto<Pingresp>>::Error>

Performs the conversion.
Source§

impl<PacketIdType> Eq for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize + Eq,

Source§

impl<PacketIdType> StructuralPartialEq for GenericPacket<PacketIdType>
where PacketIdType: IsPacketId + Serialize,

Auto Trait Implementations§

§

impl<PacketIdType> Freeze for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: Freeze,

§

impl<PacketIdType> RefUnwindSafe for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: RefUnwindSafe,

§

impl<PacketIdType> Send for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: Send,

§

impl<PacketIdType> Sync for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: Sync,

§

impl<PacketIdType> Unpin for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: Unpin,

§

impl<PacketIdType> UnwindSafe for GenericPacket<PacketIdType>
where <PacketIdType as IsPacketId>::Buffer: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsConcrete<T> for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoConcreteOwned<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more