#[non_exhaustive]pub enum BackendChangesError<E> {
CannotCalculate,
TooManyChanges {
limit: u64,
},
Other(E),
}Expand description
Error type returned by JmapReads::get_changes and
JmapReads::query_changes.
The two non-Other variants map to the RFC 8620 §5.6 wire errors
cannotCalculateChanges and tooManyChanges; /changes (§5.2) has
only the former (see changes_error_from_backend).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CannotCalculate
The server has no usable change log for the given sinceState
and cannot supply incremental changes — the client MUST
discard ALL locally cached objects for the affected type,
reset its local state token to the empty string, and perform a
full resync (/get with ids: null). Partial recovery is not
permitted. Maps to cannotCalculateChanges (RFC 8620 §5.6;
authoritative behavior documented in jmapio/jmap-js
mail-model.js).
TooManyChanges
The change window exceeds what the server can supply in a
single response. Maps to tooManyChanges with the limit as the
suggested maximum for /queryChanges (RFC 8620 §5.6). /changes
has no such error (§5.2), so
changes_error_from_backend
maps it to cannotCalculateChanges there; a get_changes backend
over maxChanges SHOULD instead return an intermediate state with
has_more_changes set.
Fields
Other(E)
An unexpected storage-layer error.
Trait Implementations§
Source§impl<E: Debug> Debug for BackendChangesError<E>
impl<E: Debug> Debug for BackendChangesError<E>
Source§impl<E: Display> Display for BackendChangesError<E>
impl<E: Display> Display for BackendChangesError<E>
Source§impl<E: Error + 'static> Error for BackendChangesError<E>
impl<E: Error + 'static> Error for BackendChangesError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<E: Error> From<BackendChangesError<E>> for JmapError
impl<E: Error> From<BackendChangesError<E>> for JmapError
Source§fn from(e: BackendChangesError<E>) -> Self
fn from(e: BackendChangesError<E>) -> Self
Auto Trait Implementations§
impl<E> Forget for BackendChangesError<E>
impl<E> Freeze for BackendChangesError<E>where
E: Freeze,
impl<E> Move for BackendChangesError<E>
impl<E> RefUnwindSafe for BackendChangesError<E>where
E: RefUnwindSafe,
impl<E> Send for BackendChangesError<E>where
E: Send,
impl<E> Sync for BackendChangesError<E>where
E: Sync,
impl<E> Unpin for BackendChangesError<E>where
E: Unpin,
impl<E> UnsafeUnpin for BackendChangesError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for BackendChangesError<E>where
E: UnwindSafe,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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.