#[non_exhaustive]pub struct ChangesParams<'a> {
pub since_state: &'a State,
pub max_changes: Option<u64>,
pub ignore_metadata_only_changes: bool,
}Expand description
The /changes arguments (RFC 8620 §5.2) passed to
JmapReads::get_changes, after accountId.
#[non_exhaustive] for the same reason as QueryParams. Build one
with ChangesParams::new, which takes the one required argument,
sinceState, and the setters:
let since = jmap_server::State::from("s1");
let params = ChangesParams::new(&since).max_changes(Some(50));
assert_eq!(params.max_changes, Some(50));
assert!(!params.ignore_metadata_only_changes);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_state: &'a StatesinceState, the state the client already has.
max_changes: Option<u64>maxChanges; None means no client limit.
ignore_metadata_only_changes: boolignoreMetadataOnlyChanges (draft-ietf-jmap-metadata-05 §3.3):
when true, a backend that tracks per-update changed properties
MUST leave out of updated every id whose only changes are to
metadata and/or privateMetadata, and those ids do not count
toward max_changes. crate::handle_changes sets it true
for a request whose using lacks urn:ietf:params:jmap:metadata
(-05 §3). A backend that does not support metadata ignores it.
Implementations§
Source§impl<'a> ChangesParams<'a>
impl<'a> ChangesParams<'a>
Sourcepub fn new(since_state: &'a State) -> Self
pub fn new(since_state: &'a State) -> Self
Changes since since_state, with no maxChanges and
ignoreMetadataOnlyChanges false (its -05 §3.3 default).
Sourcepub fn max_changes(self, max_changes: Option<u64>) -> Self
pub fn max_changes(self, max_changes: Option<u64>) -> Self
Set max_changes.