pub struct ProtocolError(/* private fields */);Expand description
A protocol error reported to the control service.
Implementations§
Source§impl ProtocolError
impl ProtocolError
Sourcepub fn get_ref(&self) -> &ProtocolError
pub fn get_ref(&self) -> &ProtocolError
Returns the protocol error.
Sourcepub fn ack<F>(self) -> ControlAck<F>
pub fn ack<F>(self) -> ControlAck<F>
Sends the response generated from the protocol error.
Sourcepub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
pub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
Replaces the generated response with a response produced from err.
Sourcepub fn fail_with<F>(self, res: Response) -> ControlAck<F>
pub fn fail_with<F>(self, res: Response) -> ControlAck<F>
Replaces the generated response with a custom response.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProtocolError
impl !Send for ProtocolError
impl !Sync for ProtocolError
impl !UnwindSafe for ProtocolError
impl Freeze for ProtocolError
impl Unpin for ProtocolError
impl UnsafeUnpin for ProtocolError
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