pub enum JmapMethodError {
ServerFail(String),
ServerUnavailable(String),
InvalidArguments(String),
UnknownMethod(String),
AccountNotFound,
Other {
kind: String,
description: String,
},
}Expand description
Subset of standard JMAP method errors used by this crate’s handlers.
JMAP defines more (e.g. cannotCalculateChanges, tooLarge) — feel free
to extend; the Other variant is the escape hatch for anything not yet
modelled.
Variants§
ServerFail(String)
RFC 8620 §3.6.2 — serverFail with an opaque description.
RFC 8620 §3.6.2 — store is configured but currently unreachable.
InvalidArguments(String)
RFC 8620 §3.6.2 — required arg missing or shape wrong.
UnknownMethod(String)
RFC 8620 §3.6.2 — method name not recognised.
AccountNotFound
RFC 8620 §3.6.2 — caller not authorised for this account.
Other
Escape hatch for any error type not modelled by a dedicated variant
above. kind becomes the JMAP "type" value verbatim; description
becomes the human-readable "description".
Implementations§
Trait Implementations§
Source§impl Clone for JmapMethodError
impl Clone for JmapMethodError
Source§fn clone(&self) -> JmapMethodError
fn clone(&self) -> JmapMethodError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JmapMethodError
impl Debug for JmapMethodError
Source§impl Display for JmapMethodError
impl Display for JmapMethodError
Source§impl Error for JmapMethodError
impl Error for JmapMethodError
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()
Auto Trait Implementations§
impl Freeze for JmapMethodError
impl RefUnwindSafe for JmapMethodError
impl Send for JmapMethodError
impl Sync for JmapMethodError
impl Unpin for JmapMethodError
impl UnsafeUnpin for JmapMethodError
impl UnwindSafe for JmapMethodError
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