#[non_exhaustive]pub enum BackendChangesError<E> {
CannotCalculate,
TooManyChanges {
limit: u64,
},
Other(E),
}Expand description
Error type returned by JmapBackend::get_changes and
JmapBackend::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()