pub struct ClientConfiguration {
pub retry_policy: Box<dyn RetryPolicy>,
pub auto_cache_peers: bool,
}Expand description
Configuration that controls the Client behaviour when making requests.
Fields§
§retry_policy: Box<dyn RetryPolicy>The retry policy to use when encountering errors after invoking a request.
auto_cache_peers: boolWhether to call Session::cache_peer on all peer information that
the high-level methods receive as a response (e.g. Client::iter_dialogs).
The cached peers are then usable by other methods such as Client::resolve_peer
for as long as the same persisted session is used.
Trait Implementations§
Source§impl Default for ClientConfiguration
impl Default for ClientConfiguration
Source§fn default() -> Self
fn default() -> Self
Returns an instance that with an AutoSleep::default retry policy,
where encountered peers are automatically passed to Session::cache_peer.
Auto Trait Implementations§
impl Freeze for ClientConfiguration
impl !RefUnwindSafe for ClientConfiguration
impl Send for ClientConfiguration
impl Sync for ClientConfiguration
impl Unpin for ClientConfiguration
impl UnsafeUnpin for ClientConfiguration
impl !UnwindSafe for ClientConfiguration
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