Struct ConnectFlags
pub struct ConnectFlags {
pub clean_start: bool,
pub will: bool,
pub will_qos: QoS,
pub will_retain: bool,
pub password: bool,
pub username: bool,
}Expand description
Connect flags byte.
Fields§
§clean_start: boolStart a new session, discarding any existing one.
will: boolWhether a will message is included.
will_qos: QoSQoS level for the will message.
will_retain: boolWhether the will message should be retained.
password: boolWhether a password is present.
username: boolWhether a username is present.
Implementations§
§impl ConnectFlags
impl ConnectFlags
pub const fn from_byte(b: u8) -> Result<Self, DecodeError>
pub const fn from_byte(b: u8) -> Result<Self, DecodeError>
Decodes a connect flags byte.
§Errors
Returns DecodeError::InvalidValue if the reserved bit is set, or
if the will-related flags are inconsistent per the MQTT specification.
Trait Implementations§
§impl Clone for ConnectFlags
impl Clone for ConnectFlags
§fn clone(&self) -> ConnectFlags
fn clone(&self) -> ConnectFlags
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 more§impl Debug for ConnectFlags
impl Debug for ConnectFlags
§impl PartialEq for ConnectFlags
impl PartialEq for ConnectFlags
impl Copy for ConnectFlags
impl Eq for ConnectFlags
impl StructuralPartialEq for ConnectFlags
Auto Trait Implementations§
impl Freeze for ConnectFlags
impl RefUnwindSafe for ConnectFlags
impl Send for ConnectFlags
impl Sync for ConnectFlags
impl Unpin for ConnectFlags
impl UnwindSafe for ConnectFlags
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