pub enum ClientError {
Unreachable {
address: String,
detail: String,
},
NoReason,
Unsendable {
detail: String,
},
Unreadable {
status: u16,
detail: String,
},
Refused {
status: u16,
detail: String,
},
PrinterRefused {
detail: String,
answer: Box<ActionAnswer>,
},
Rejected(Box<Rejection>),
}Expand description
Why a call did not answer what it asked for.
Variants§
Unreachable
Nothing answered at the configured address.
Fields
NoReason
This client would not send the request, because it carried no reason.
Every mutating operation carries a reason, and a call whose reason is empty is refused here rather than at the server: nothing reaches the policy, the printer or the record.
Unsendable
A value of the request could not be rendered as JSON.
Unreadable
The supervisor answered something this client cannot read.
Fields
Refused
The supervisor will not do what it was asked, and said why.
PrinterRefused
The policy accepted the action and the machine refused it.
Fields
§
answer: Box<ActionAnswer>The record of the request and the decision taken on it.
Rejected(Box<Rejection>)
The policy refused the action, and the refusal is the answer.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ClientError
impl PartialEq for ClientError
impl StructuralPartialEq for ClientError
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl UnwindSafe for ClientError
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