Struct Connack
pub struct Connack<'a> {
pub session_present: bool,
pub reason_code: ReasonCode,
pub properties: &'a ConnackProperties,
}Expand description
CONNACK packet sent by the server in response to CONNECT.
Fields§
§session_present: boolWhether the server has a session state for this client.
reason_code: ReasonCodeReason code for the connection result.
properties: &'a ConnackPropertiesCONNACK properties (server capabilities).
Implementations§
§impl<'a> Connack<'a>
impl<'a> Connack<'a>
pub const fn decode(r: &mut Reader<'a>) -> Result<Self, DecodeError>
pub const fn decode(r: &mut Reader<'a>) -> Result<Self, DecodeError>
Decodes a CONNACK packet from the reader.
§Errors
Returns DecodeError if the data is malformed or has invalid flags.
It also fails if the properties contain disallowed IDs.
Trait Implementations§
impl<'a> Eq for Connack<'a>
impl<'a> StructuralPartialEq for Connack<'a>
Auto Trait Implementations§
impl<'a> Freeze for Connack<'a>
impl<'a> RefUnwindSafe for Connack<'a>
impl<'a> Send for Connack<'a>
impl<'a> Sync for Connack<'a>
impl<'a> Unpin for Connack<'a>
impl<'a> UnsafeUnpin for Connack<'a>
impl<'a> UnwindSafe for Connack<'a>
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