#[non_exhaustive]pub struct QueryChangesParams<'a, O: QueryObject> {
pub since_query_state: &'a State,
pub filter: Option<&'a O::Filter>,
pub sort: Option<&'a [O::Comparator]>,
pub max_changes: Option<u64>,
pub up_to_id: Option<&'a Id>,
pub collapse_threads: bool,
pub language: Option<&'a [LanguageRange]>,
}Expand description
The /queryChanges arguments (RFC 8620 §5.6) passed to
JmapReads::query_changes, after accountId.
#[non_exhaustive] for the same reason as QueryParams. Build one
with QueryChangesParams::new, which takes the one required
argument, sinceQueryState, and the setters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.since_query_state: &'a StatesinceQueryState, the queryState the client already has.
filter: Option<&'a O::Filter>filter, as passed to the original /query.
sort: Option<&'a [O::Comparator]>sort, as passed to the original /query.
max_changes: Option<u64>maxChanges; None means no client limit.
up_to_id: Option<&'a Id>upToId: the last id in the client’s cached results.
collapse_threads: boolcollapseThreads, meaningful only for Email/queryChanges
(RFC 8621 §4.5); false for every other type.
language: Option<&'a [LanguageRange]>language, as passed to the original /query
(draft-atwood-jmap-updates-00 §4.2.3): sort and filter
on a localizable property (JmapObject::LOCALIZABLE) compare the
value /get with these ranges returns
(jmap_types::i18n::localized_value), not the base value. None
compares stored values. Set only for an account whose
JmapAccounts::i18n_info is Some; such a backend MUST honour it.
Implementations§
Source§impl<'a, O: QueryObject> QueryChangesParams<'a, O>
impl<'a, O: QueryObject> QueryChangesParams<'a, O>
Sourcepub fn new(since_query_state: &'a State) -> Self
pub fn new(since_query_state: &'a State) -> Self
Changes since since_query_state, with no filter, sort,
maxChanges or upToId, and collapseThreads false.
Sourcepub fn sort(self, sort: Option<&'a [O::Comparator]>) -> Self
pub fn sort(self, sort: Option<&'a [O::Comparator]>) -> Self
Set sort.
Sourcepub fn max_changes(self, max_changes: Option<u64>) -> Self
pub fn max_changes(self, max_changes: Option<u64>) -> Self
Set max_changes.
Sourcepub fn collapse_threads(self, collapse_threads: bool) -> Self
pub fn collapse_threads(self, collapse_threads: bool) -> Self
Set collapse_threads.
Sourcepub fn language(self, language: Option<&'a [LanguageRange]>) -> Self
pub fn language(self, language: Option<&'a [LanguageRange]>) -> Self
Set language.