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) -> ControlResult
pub fn ack(self, reason: DisconnectReasonCode) -> ControlResult
Ack service error, return disconnect packet and close connection.
sourcepub fn ack_with<F>(self, f: F) -> ControlResultwhere
F: FnOnce(E, Disconnect) -> Disconnect,
pub fn ack_with<F>(self, f: F) -> ControlResultwhere
F: FnOnce(E, Disconnect) -> Disconnect,
Ack service error, return disconnect packet and close connection.