#[non_exhaustive]pub enum MethodErrorType {
Show 24 variants
UnknownCapability,
NotJson,
NotRequest,
Limit,
ServerUnavailable,
ServerFail,
ServerPartialFail,
UnknownMethod,
InvalidArguments,
InvalidResultReference,
Forbidden,
AccountNotFound,
AccountNotSupportedByMethod,
AccountReadOnly,
RequestTooLarge,
CannotCalculateChanges,
StateMismatch,
FromAccountNotFound,
FromAccountNotSupportedByMethod,
AnchorNotFound,
UnsupportedSort,
UnsupportedFilter,
TooManyChanges,
Other(String),
}Expand description
The machine-readable type of a JmapError.
Known variants are the RFC 8620 request-level error types (§3.6.1,
whose wire form in an RFC 9457 problem-details body is prefixed with
urn:ietf:params:jmap:error:), the §3.6.2 method-level error types,
and the method-specific errors of §5.1 to §5.6. Every other wire
string, including extension errors such as "rateLimited", is
Self::Other.
From<&str> and Deserialize share one mapping: a known wire string
always builds its typed variant, never Other.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownCapability
RFC 8620 §3.6.1 — the request used an unsupported capability.
NotJson
RFC 8620 §3.6.1 — the content type was not application/json or
the request did not parse as I-JSON.
NotRequest
RFC 8620 §3.6.1 — the request parsed as JSON but not as a Request object.
Limit
RFC 8620 §3.6.1 — the request exceeded a server limit; the limit’s
name is JmapError::limit_name.
RFC 8620 §3.6.2 — an internal server resource was temporarily unavailable.
ServerFail
RFC 8620 §3.6.2 — an unexpected error occurred.
ServerPartialFail
RFC 8620 §3.6.2 — some, but not all, expected changes were made.
UnknownMethod
RFC 8620 §3.6.2 — the server does not recognise this method name.
InvalidArguments
RFC 8620 §3.6.2 — an argument is of the wrong type or invalid.
InvalidResultReference
RFC 8620 §3.6.2 — a result reference failed to resolve.
Forbidden
RFC 8620 §3.6.2 — the method or arguments are forbidden.
AccountNotFound
RFC 8620 §3.6.2 — the accountId does not correspond to a valid
account.
AccountNotSupportedByMethod
RFC 8620 §3.6.2 — the account does not support this method.
AccountReadOnly
RFC 8620 §3.6.2 — the account is read-only.
RequestTooLarge
RFC 8620 §5.1 and §5.3 — too many ids or objects in one call.
CannotCalculateChanges
RFC 8620 §5.2 and §5.6 — the server cannot calculate the changes from the given state.
StateMismatch
RFC 8620 §5.3 and §5.4 — ifInState did not match the current
state.
FromAccountNotFound
RFC 8620 §5.4 — the fromAccountId does not correspond to a valid
account.
FromAccountNotSupportedByMethod
RFC 8620 §5.4 — the fromAccountId account does not support this
method.
AnchorNotFound
RFC 8620 §5.5 — the anchor was not found in the results.
UnsupportedSort
RFC 8620 §5.5 — the sort is syntactically valid but unsupported.
UnsupportedFilter
RFC 8620 §5.5 — the filter is syntactically valid but unsupported.
TooManyChanges
RFC 8620 §5.6 — there are more changes than maxChanges.
Other(String)
Any other error type, such as an extension’s.
Implementations§
Trait Implementations§
Source§impl Clone for MethodErrorType
impl Clone for MethodErrorType
Source§impl Debug for MethodErrorType
impl Debug for MethodErrorType
Source§impl<'de> Deserialize<'de> for MethodErrorType
impl<'de> Deserialize<'de> for MethodErrorType
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Display for MethodErrorType
impl Display for MethodErrorType
impl Eq for MethodErrorType
Source§impl From<&str> for MethodErrorType
impl From<&str> for MethodErrorType
Source§impl From<String> for MethodErrorType
impl From<String> for MethodErrorType
Source§impl Hash for MethodErrorType
impl Hash for MethodErrorType
Source§impl PartialEq for MethodErrorType
impl PartialEq for MethodErrorType
Source§impl Serialize for MethodErrorType
impl Serialize for MethodErrorType
impl StructuralPartialEq for MethodErrorType
Auto Trait Implementations§
impl Forget for MethodErrorType
impl Freeze for MethodErrorType
impl Move for MethodErrorType
impl RefUnwindSafe for MethodErrorType
impl Send for MethodErrorType
impl Sync for MethodErrorType
impl Unpin for MethodErrorType
impl UnsafeUnpin for MethodErrorType
impl UnwindSafe for MethodErrorType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.