pub enum SyncRecycleStrategy {
SelectOne,
Ping,
None,
Custom(SyncRecycleCheck),
}Expand description
Strategy used by the synchronous ConnectionPool to validate a connection
when it is checked out.
Mirrors RecycleStrategy for the blocking Connection type. Defaults to
SelectOne.
Variants§
SelectOne
Run a SELECT 1 round-trip on every checkout (the default).
Ping
Call Connection::ping on every checkout.
None
Skip the active probe; only the passive Connection::is_alive check runs.
Custom(SyncRecycleCheck)
Run a user-supplied synchronous check on every checkout.
Trait Implementations§
Source§impl Clone for SyncRecycleStrategy
impl Clone for SyncRecycleStrategy
Source§fn clone(&self) -> SyncRecycleStrategy
fn clone(&self) -> SyncRecycleStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyncRecycleStrategy
impl Debug for SyncRecycleStrategy
Source§impl Default for SyncRecycleStrategy
impl Default for SyncRecycleStrategy
Source§fn default() -> SyncRecycleStrategy
fn default() -> SyncRecycleStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SyncRecycleStrategy
impl !UnwindSafe for SyncRecycleStrategy
impl Freeze for SyncRecycleStrategy
impl Send for SyncRecycleStrategy
impl Sync for SyncRecycleStrategy
impl Unpin for SyncRecycleStrategy
impl UnsafeUnpin for SyncRecycleStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request