pub struct Disconnect {
pub reason_code: DisconnectReasonCode,
pub properties: DisconnectProperties,
}
Expand description
Body type for DISCONNECT packet.
Fields§
§reason_code: DisconnectReasonCode
§properties: DisconnectProperties
Implementations§
Source§impl Disconnect
impl Disconnect
pub fn new(reason_code: DisconnectReasonCode) -> Self
pub fn new_normal() -> Self
pub async fn decode_async<T: AsyncRead + Unpin>( reader: &mut T, header: Header, ) -> Result<Self, ErrorV5>
Trait Implementations§
Source§impl Clone for Disconnect
impl Clone for Disconnect
Source§fn clone(&self) -> Disconnect
fn clone(&self) -> Disconnect
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 moreSource§impl Debug for Disconnect
impl Debug for Disconnect
Source§impl Encodable for Disconnect
impl Encodable for Disconnect
Source§impl From<Disconnect> for Packet
impl From<Disconnect> for Packet
Source§fn from(p: Disconnect) -> Self
fn from(p: Disconnect) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Disconnect
impl PartialEq for Disconnect
impl Eq for Disconnect
impl StructuralPartialEq for Disconnect
Auto Trait Implementations§
impl Freeze for Disconnect
impl RefUnwindSafe for Disconnect
impl Send for Disconnect
impl Sync for Disconnect
impl Unpin for Disconnect
impl UnwindSafe for Disconnect
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