#[non_exhaustive]pub struct RoutingInfo<'a> {
pub consistency: Consistency,
pub serial_consistency: Option<SerialConsistency>,
pub token: Option<Token>,
pub table: Option<&'a TableSpec<'a>>,
pub is_confirmed_lwt: bool,
}Expand description
Represents info about statement that can be used by load balancing policies.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.consistency: ConsistencyRequested consistency information allows to route requests to the appropriate datacenters. E.g. requests with a LOCAL_ONE consistency should be routed to the same datacenter.
serial_consistency: Option<SerialConsistency>§token: Option<Token>Information that are the basis of token-aware routing:
- token, keyspace for vnodes-based routing;
- token, keyspace, table for tablets-based routing.
table: Option<&'a TableSpec<'a>>§is_confirmed_lwt: boolIf, while preparing, we received from the cluster information that the statement is an LWT, then we can use this information for routing optimisation. Namely, an optimisation can be performed: the request should be routed to the replicas in a predefined order (i. e. always try first to contact replica A, then B if it fails, then C, etc.). If false, the request should be routed normally. Note: this a Scylla-specific optimisation. Therefore, the flag will be always false for Cassandra.
Trait Implementations§
Source§impl<'a> Clone for RoutingInfo<'a>
impl<'a> Clone for RoutingInfo<'a>
Source§fn clone(&self) -> RoutingInfo<'a>
fn clone(&self) -> RoutingInfo<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for RoutingInfo<'a>
impl<'a> Debug for RoutingInfo<'a>
Source§impl<'a> Default for RoutingInfo<'a>
impl<'a> Default for RoutingInfo<'a>
Source§fn default() -> RoutingInfo<'a>
fn default() -> RoutingInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for RoutingInfo<'a>
impl<'a> RefUnwindSafe for RoutingInfo<'a>
impl<'a> Send for RoutingInfo<'a>
impl<'a> Sync for RoutingInfo<'a>
impl<'a> Unpin for RoutingInfo<'a>
impl<'a> UnwindSafe for RoutingInfo<'a>
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
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>
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>
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