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) -> ControlResult
pub fn ack_with<F>(self, f: F) -> ControlResult
Ack service error, return disconnect packet and close connection.
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Error<E>
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> !UnwindSafe for Error<E>
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