[−][src]Struct melib::backends::jmap::rfc8620::QueryChangesResponse
Fields
account_id: Id<Account>
The id of the account used for the call.
old_query_state: String
This is the "sinceQueryState" argument echoed back; that is, the state from which the server is returning changes.
new_query_state: String
This is the state the query will be in after applying the set of changes to the old state.
total: Option<usize>
The total number of Foos in the results (given the "filter"). This argument MUST be omitted if the "calculateTotal" request argument is not true.
removed: Vec<Id<OBJ>>
The "id" for every Foo that was in the query results in the old state and that is not in the results in the new state. If the server cannot calculate this exactly, the server MAY return the ids of extra Foos in addition that may have been in the old results but are not in the new results. If the sort and filter are both only on immutable properties and an "upToId" is supplied and exists in the results, any ids that were removed but have a higher index than "upToId" SHOULD be omitted. If the "filter" or "sort" includes a mutable property, the server MUST include all Foos in the current results for which this property may have changed. The position of these may have moved in the results, so they must be reinserted by the client to ensure its query cache is correct.
added: Vec<AddedItem<OBJ>>
The id and index in the query results (in the new state) for every Foo that has been added to the results since the old state AND every Foo in the current results that was included in the "removed" array (due to a filter or sort based upon a mutable property). If the sort and filter are both only on immutable properties and an "upToId" is supplied and exists in the results, any ids that were added but have a higher index than "upToId" SHOULD be omitted. The array MUST be sorted in order of index, with the lowest index first. An AddedItem object has the following properties:
- id: "Id"
- index: "UnsignedInt" The result of this is that if the client has a cached sparse array of Foo ids corresponding to the results in the old state, then: fooIds = [ "id1", "id2", null, null, "id3", "id4", null, null, null ] If it splices out all ids in the removed array that it has in its cached results, then: removed = [ "id2", "id31", ... ]; fooIds => [ "id1", null, null, "id3", "id4", null, null, null ] and splices in (one by one in order, starting with the lowest index) all of the ids in the added array: added = [{ id: "id5", index: 0, ... }]; fooIds => [ "id5", "id1", null, null, "id3", "id4", null, null, null ] and truncates or extends to the new total length, then the results will now be in the new state. Note: splicing in adds the item at the given index, incrementing the index of all items previously at that or a higher index. Splicing out is the inverse, removing the item and decrementing the index of every item after it in the array.
Trait Implementations
impl<OBJ: Debug + Object> Debug for QueryChangesResponse<OBJ>
[src]
impl<'de, OBJ: Object> Deserialize<'de> for QueryChangesResponse<OBJ> where
OBJ: Deserialize<'de>,
[src]
OBJ: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<OBJ: Object> Serialize for QueryChangesResponse<OBJ> where
OBJ: Serialize,
[src]
OBJ: Serialize,
Auto Trait Implementations
impl<OBJ> RefUnwindSafe for QueryChangesResponse<OBJ>
impl<OBJ> Send for QueryChangesResponse<OBJ>
impl<OBJ> Sync for QueryChangesResponse<OBJ>
impl<OBJ> Unpin for QueryChangesResponse<OBJ>
impl<OBJ> UnwindSafe for QueryChangesResponse<OBJ>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,