pub struct BrokerClose {
pub code: u32,
pub reason: String,
}Expand description
Deliberate final frame sent before the broker closes an accepted session.
Fields§
§code: u32Stable close code interpreted after a successful handshake.
reason: StringHuman-readable close reason suitable for diagnostics.
Implementations§
Source§impl BrokerClose
impl BrokerClose
Sourcepub fn new<T>(code: BrokerCloseCode, reason: T) -> Self
pub fn new<T>(code: BrokerCloseCode, reason: T) -> Self
Creates a typed version 1 deliberate-close payload.
Trait Implementations§
Source§impl Debug for BrokerClose
impl Debug for BrokerClose
Source§impl<'de> Deserialize<'de> for BrokerClose
impl<'de> Deserialize<'de> for BrokerClose
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
Auto Trait Implementations§
impl Freeze for BrokerClose
impl RefUnwindSafe for BrokerClose
impl Send for BrokerClose
impl Sync for BrokerClose
impl Unpin for BrokerClose
impl UnsafeUnpin for BrokerClose
impl UnwindSafe for BrokerClose
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