pub struct Error<E> { /* private fields */ }Expand description
Service level error
Implementations§
Source§impl<E> Error<E>
impl<E> Error<E>
pub fn new(err: E) -> Self
Sourcepub fn reason_string(self, reason: ByteString) -> Self
pub fn reason_string(self, reason: ByteString) -> Self
Set reason string for disconnect packet
Sourcepub fn server_reference(self, reference: ByteString) -> Self
pub fn server_reference(self, reference: ByteString) -> Self
Set server reference for disconnect packet
Sourcepub fn properties<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut UserProperties),
pub fn properties<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut UserProperties),
Update disconnect packet properties
Sourcepub fn ack(self, reason: DisconnectReasonCode) -> ControlAck
pub fn ack(self, reason: DisconnectReasonCode) -> ControlAck
Ack service error, return disconnect packet and close connection.
Sourcepub fn ack_with<F>(self, f: F) -> ControlAck
pub fn ack_with<F>(self, f: F) -> ControlAck
Ack service error, return disconnect packet and close connection.