[][src]Struct melib::backends::jmap::rfc8620::QueryChanges

pub struct QueryChanges<F: FilterTrait<OBJ>, OBJ: Object> where
    OBJ: Debug + Serialize
{ pub account_id: Id<Account>, pub filter: Option<F>, pub sort: Option<Comparator<OBJ>>, pub since_query_state: String, pub max_changes: Option<usize>, pub up_to_id: Option<Id<OBJ>>, pub calculate_total: bool, _ph: PhantomData<fn() -> OBJ>, }

#queryChanges

The "Foo/queryChanges" method allows a client to efficiently update the state of a cached query to match the new state on the server. It takes the following arguments:

Fields

account_id: Id<Account>filter: Option<F>sort: Option<Comparator<OBJ>>since_query_state: String

sinceQueryState: "String"

The current state of the query in the client. This is the string that was returned as the "queryState" argument in the "Foo/query" response with the same sort/filter. The server will return the changes made to the query since this state.

max_changes: Option<usize>

o maxChanges: "UnsignedInt|null"

The maximum number of changes to return in the response. See error descriptions below for more details.

up_to_id: Option<Id<OBJ>>

o upToId: "Id|null"

The last (highest-index) id the client currently has cached from the query results. When there are a large number of results, in a common case, the client may have only downloaded and cached a small subset from the beginning of the results. If the sort and filter are both only on immutable properties, this allows the server to omit changes after this point in the results, which can significantly increase efficiency. If they are not immutable, this argument is ignored.

calculate_total: bool

o calculateTotal: "Boolean" (default: false)

Does the client wish to know the total number of results now in the query? This may be slow and expensive for servers to calculate, particularly with complex filters, so clients should take care to only request the total when needed.

_ph: PhantomData<fn() -> OBJ>

Implementations

impl<F: FilterTrait<OBJ>, OBJ: Object> QueryChanges<F, OBJ> where
    OBJ: Debug + Serialize
[src]

pub fn new(account_id: Id<Account>, since_query_state: String) -> Self[src]

pub fn filter(self, new_val: Option<F>) -> Self[src]

pub fn sort(self, new_val: Option<Comparator<OBJ>>) -> Self[src]

pub fn max_changes(self, new_val: Option<usize>) -> Self[src]

pub fn up_to_id(self, new_val: Option<Id<OBJ>>) -> Self[src]

pub fn calculate_total(self, new_val: bool) -> Self[src]

Trait Implementations

impl<F: Debug + FilterTrait<OBJ>, OBJ: Debug + Object> Debug for QueryChanges<F, OBJ> where
    OBJ: Debug + Serialize
[src]

impl<F: FilterTrait<OBJ>, OBJ: Object> Serialize for QueryChanges<F, OBJ> where
    OBJ: Debug + Serialize,
    F: Serialize,
    OBJ: Serialize
[src]

Auto Trait Implementations

impl<F, OBJ> RefUnwindSafe for QueryChanges<F, OBJ> where
    F: RefUnwindSafe

impl<F, OBJ> Send for QueryChanges<F, OBJ> where
    F: Send

impl<F, OBJ> Sync for QueryChanges<F, OBJ> where
    F: Sync

impl<F, OBJ> Unpin for QueryChanges<F, OBJ> where
    F: Unpin

impl<F, OBJ> UnwindSafe for QueryChanges<F, OBJ> where
    F: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]