#[repr(u8)]
pub enum QoS {
AtMostOnce,
AtLeastOnce,
ExactlyOnce,
}
Expand description
Quality of Service
Variants
AtMostOnce
At most once delivery
The message is delivered according to the capabilities of the underlying network. No response is sent by the receiver and no retry is performed by the sender. The message arrives at the receiver either once or not at all.
AtLeastOnce
At least once delivery
This quality of service ensures that the message arrives at the receiver at least once. A QoS 1 PUBLISH Packet has a Packet Identifier in its variable header and is acknowledged by a PUBACK Packet.
ExactlyOnce
Exactly once delivery
This is the highest quality of service, for use when neither loss nor duplication of messages are acceptable. There is an increased overhead associated with this quality of service.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for QoS
impl<'de> Deserialize<'de> for QoS
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<QoS> for ProtocolError
impl From<QoS> for ProtocolError
sourcefn from(original: QoS) -> ProtocolError
fn from(original: QoS) -> ProtocolError
Converts to this type from the input type.
sourceimpl Ord for QoS
impl Ord for QoS
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<QoS> for QoS
impl PartialOrd<QoS> for QoS
sourcefn partial_cmp(&self, other: &QoS) -> Option<Ordering>
fn partial_cmp(&self, other: &QoS) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for QoS
impl Eq for QoS
impl StructuralEq for QoS
impl StructuralPartialEq for QoS
Auto Trait Implementations
impl RefUnwindSafe for QoS
impl Send for QoS
impl Sync for QoS
impl Unpin for QoS
impl UnwindSafe for QoS
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more