pub struct CommandError {
pub code: String,
pub message: String,
pub details: Option<Value>,
pub retryable: bool,
}Expand description
The structured failure the driver protocol carries in an error. details
and retryable carry the typed mutation fields to the host; non-mutation
failures leave both at their defaults.
Fields§
§code: String§message: String§details: Option<Value>§retryable: boolImplementations§
Source§impl CommandError
impl CommandError
pub fn new(code: impl Into<String>, message: impl Into<String>) -> Self
Sourcepub fn from_client(error: ClientError) -> Self
pub fn from_client(error: ClientError) -> Self
Consume a structured client authoring failure without re-parsing text.
Trait Implementations§
Source§impl Clone for CommandError
impl Clone for CommandError
Source§impl Debug for CommandError
impl Debug for CommandError
Auto Trait Implementations§
impl Forget for CommandError
impl Freeze for CommandError
impl RefUnwindSafe for CommandError
impl Send for CommandError
impl Sync for CommandError
impl Unpin for CommandError
impl UnsafeUnpin for CommandError
impl UnwindSafe for CommandError
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