Skip to main content

JmapMethodError

Enum JmapMethodError 

Source
pub enum JmapMethodError {
Show 18 variants ServerFail { description: Option<String>, }, ServerPartialFail, ServerUnavailable { description: Option<String>, }, UnknownCapability { description: Option<String>, }, NotJson { description: Option<String>, }, NotRequest { description: Option<String>, }, Limit { description: Option<String>, limit: String, }, InvalidArguments { description: Option<String>, }, Forbidden { description: Option<String>, }, RequestTooLarge, NotFound, InvalidPatch { description: Option<String>, }, WillDestroy { description: Option<String>, }, InvalidProperties { description: Option<String>, properties: Vec<String>, }, Singleton, UnknownMethod { description: Option<String>, }, CannotCalculateChanges { description: Option<String>, }, Unknown,
}
Expand description

A JMAP method-level error (RFC 8620 §3.6.1).

NOTE: variants keep the struct shape even with a single field, the internally-tagged serde representation of the wire object requires it.

Variants§

§

ServerFail

An unexpected or unknown error occurred during the method call.

Fields

§description: Option<String>

Optional human-readable detail.

§

ServerPartialFail

Some, but not all, expected changes were applied.

§

ServerUnavailable

The server is currently unable to run the method.

Fields

§description: Option<String>

Optional human-readable detail.

§

UnknownCapability

The method requires a capability the request did not declare.

Fields

§description: Option<String>

Optional human-readable detail.

§

NotJson

The request body was not valid JSON.

Fields

§description: Option<String>

Optional human-readable detail.

§

NotRequest

The request parsed as JSON but is not a valid Request object.

Fields

§description: Option<String>

Optional human-readable detail.

§

Limit

A server-defined limit was exceeded.

Fields

§description: Option<String>

Optional human-readable detail.

§limit: String

The name of the exceeded limit.

§

InvalidArguments

One of the method arguments is invalid.

Fields

§description: Option<String>

Optional human-readable detail.

§

Forbidden

Access denied for this method call (RFC 8620 §3.6.2), e.g. requesting the url or keys properties in PushSubscription/get (§7.2.1).

Fields

§description: Option<String>

Optional human-readable detail.

§

RequestTooLarge

The total request size exceeds the server limit.

§

NotFound

The referenced object does not exist.

§

InvalidPatch

A Foo/set update patch is invalid.

Fields

§description: Option<String>

Optional human-readable detail.

§

WillDestroy

The object will be destroyed by this request, so it cannot be updated.

Fields

§description: Option<String>

Optional human-readable detail.

§

InvalidProperties

One or more object properties are invalid.

Fields

§description: Option<String>

Optional human-readable detail.

§properties: Vec<String>

The invalid property names.

§

Singleton

The type is a singleton, objects cannot be created or destroyed.

§

UnknownMethod

The method name is not known by the server.

Fields

§description: Option<String>

Optional human-readable detail.

§

CannotCalculateChanges

Server can no longer compute changes from sinceState (RFC 8620 §5.2): callers MUST fall back to Foo/get and resume from the returned state.

Fields

§description: Option<String>

Optional human-readable detail.

§

Unknown

Any error type this library does not know about.

Trait Implementations§

Source§

impl Clone for JmapMethodError

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for JmapMethodError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for JmapMethodError

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for JmapMethodError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for JmapMethodError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<JmapMethodError> for JmapChangesError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapGetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapPushSubscriptionGetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapPushSubscriptionSetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapQueryError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapQueryChangesError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapSetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapEmailCopyError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapEmailImportError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapEmailParseError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapEmailSubmissionCancelError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapEmailSubmissionSetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapIdentitySetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapVacationResponseSetError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl From<JmapMethodError> for JmapContactCardCopyError

Source§

fn from(source: JmapMethodError) -> Self

Converts to this type from the input type.
Source§

impl Serialize for JmapMethodError

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.