pub struct ParsedHints {
pub route: Option<RouteTarget>,
pub node: Option<String>,
pub consistency: Option<ConsistencyLevel>,
pub pool: Option<PoolingModeHint>,
pub cache: Option<CacheBehavior>,
pub timeout: Option<Duration>,
pub priority: Option<QueryPriority>,
pub max_lag: Option<Duration>,
pub retry: Option<RetryBehavior>,
pub branch: Option<String>,
pub twr: Option<bool>,
pub cache_ttl: Option<Duration>,
/* private fields */
}Expand description
Parsed hints collection
Fields§
§route: Option<RouteTarget>Route target (if specified)
node: Option<String>Specific node (if specified)
consistency: Option<ConsistencyLevel>Consistency level (if specified)
pool: Option<PoolingModeHint>Pool mode (if specified)
cache: Option<CacheBehavior>Cache behavior (if specified)
timeout: Option<Duration>Query timeout (if specified)
priority: Option<QueryPriority>Query priority (if specified)
max_lag: Option<Duration>Maximum acceptable lag (if specified)
retry: Option<RetryBehavior>Retry behavior (if specified)
branch: Option<String>Branch name (if specified)
twr: Option<bool>Transparent Write Routing (if specified)
cache_ttl: Option<Duration>Cache TTL override (if specified)
Implementations§
Source§impl ParsedHints
impl ParsedHints
Sourcepub fn add(&mut self, hint: RoutingHint)
pub fn add(&mut self, hint: RoutingHint)
Add a hint to the collection
Sourcepub fn hints(&self) -> &[RoutingHint]
pub fn hints(&self) -> &[RoutingHint]
Get all hints
Sourcepub fn is_primary_route(&self) -> bool
pub fn is_primary_route(&self) -> bool
Check if route=primary is specified
Sourcepub fn is_standby_route(&self) -> bool
pub fn is_standby_route(&self) -> bool
Check if any standby route is specified
Trait Implementations§
Source§impl Clone for ParsedHints
impl Clone for ParsedHints
Source§fn clone(&self) -> ParsedHints
fn clone(&self) -> ParsedHints
Returns a duplicate of the value. Read more
1.0.0 · 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 ParsedHints
impl Debug for ParsedHints
Source§impl Default for ParsedHints
impl Default for ParsedHints
Source§fn default() -> ParsedHints
fn default() -> ParsedHints
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParsedHints
impl RefUnwindSafe for ParsedHints
impl Send for ParsedHints
impl Sync for ParsedHints
impl Unpin for ParsedHints
impl UnsafeUnpin for ParsedHints
impl UnwindSafe for ParsedHints
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more