Enum artemis::RequestPolicy[][src]

#[repr(u8)]pub enum RequestPolicy {
    CacheFirst,
    CacheOnly,
    NetworkOnly,
    CacheAndNetwork,
}

The request policy of the request.

  • CacheFirst - Prefers results from the cache, if it’s not found it is fetched
  • CacheOnly - Only fetches results from the cache, if it’s not found it will simply return None for the data
  • NetworkOnly - Only fetches results from the network and ignores the cache.
  • CacheAndNetwork - Returns the result from the cache if it exists, but also refetch from the network and push the result to a subscription. This acts the same as CacheFirst without subscriptions, but has overhead.

Variants

CacheFirst

Prefers results from the cache, if it’s not found it is fetched

CacheOnly

Only fetches results from the cache, if it’s not found it will simply return None for the data

NetworkOnly

Only fetches results from the network and ignores the cache.

CacheAndNetwork

Returns the result from the cache if it exists, but also refetch from the network and push the result to a subscription. This acts the same as CacheFirst without subscriptions, but has overhead.

Trait Implementations

impl Clone for RequestPolicy[src]

impl Debug for RequestPolicy[src]

impl From<u8> for RequestPolicy[src]

impl PartialEq<RequestPolicy> for RequestPolicy[src]

impl StructuralPartialEq for RequestPolicy[src]

Auto Trait Implementations

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> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.