pub struct ClientOptions {
pub cache_expiration: Duration,
pub retries: u32,
pub retry_fn: Rc<dyn Fn(u32) -> Duration>,
}
Expand description
Global query options.
These can be overridden on a per query basis with QueryOptions
.
§Options
cache_expiration
- The time before a cached query result expires. Default: 5 minutesretries
- The number of times to retry a query if it fails. Default: 3retry_fn
- The function for the timeout between retries. Defaults to exponential delay starting with 1 second, but not going over 30 seconds.
Fields§
§cache_expiration: Duration
The time before a cached query result expires. Default: 5 minutes
retries: u32
The number of times to retry a query if it fails. Default: 3
retry_fn: Rc<dyn Fn(u32) -> Duration>
The function for the timeout between retries. Defaults to exponential delay starting with 1 second, but not going over 30 seconds.
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClientOptions
impl !RefUnwindSafe for ClientOptions
impl !Send for ClientOptions
impl !Sync for ClientOptions
impl Unpin for ClientOptions
impl !UnwindSafe for ClientOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more