#[repr(u8)]pub enum QoS {
AtMostOnce = 0,
AtLeastOnce = 1,
ExactlyOnce = 2,
}
Expand description
Quality of Service levels for message delivery
Determines the guarantee of message delivery between client and broker
Variants§
AtMostOnce = 0
At most once delivery (Fire and Forget)
§Example
Used for non-critical sensor data where occasional loss is acceptable
AtLeastOnce = 1
At least once delivery (Acknowledged Delivery)
§Example
Used for important notifications that must be received but can tolerate duplicates
ExactlyOnce = 2
Exactly once delivery (Assured Delivery)
§Example
Used for critical commands where duplication could cause harmful effects
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QoS
impl<'de> Deserialize<'de> for QoS
Source§fn 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
Source§impl Ord for QoS
impl Ord for QoS
Source§impl PartialOrd for QoS
impl PartialOrd for QoS
impl Copy for QoS
impl Eq for QoS
impl StructuralPartialEq for QoS
Auto Trait Implementations§
impl Freeze for QoS
impl RefUnwindSafe for QoS
impl Send for QoS
impl Sync for QoS
impl Unpin for QoS
impl UnwindSafe for QoS
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