Struct scylla::transport::ClusterData
source · pub struct ClusterData { /* private fields */ }
Implementations§
source§impl ClusterData
impl ClusterData
sourcepub fn get_keyspace_info(&self) -> &HashMap<String, Keyspace>
pub fn get_keyspace_info(&self) -> &HashMap<String, Keyspace>
Access keyspaces details collected by the driver Driver collects various schema details like tables, partitioners, columns, types. They can be read using this method
sourcepub fn get_nodes_info(&self) -> &[Arc<Node>]
pub fn get_nodes_info(&self) -> &[Arc<Node>]
Access details about nodes known to the driver
sourcepub fn compute_token(
&self,
keyspace: &str,
table: &str,
partition_key: &SerializedValues,
) -> Result<Token, BadQuery>
pub fn compute_token( &self, keyspace: &str, table: &str, partition_key: &SerializedValues, ) -> Result<Token, BadQuery>
Compute token of a table partition key
sourcepub fn get_token_endpoints(
&self,
keyspace: &str,
table: &str,
token: Token,
) -> Vec<(Arc<Node>, Shard)>
pub fn get_token_endpoints( &self, keyspace: &str, table: &str, token: Token, ) -> Vec<(Arc<Node>, Shard)>
Access to replicas owning a given token
sourcepub fn get_endpoints(
&self,
keyspace: &str,
table: &str,
partition_key: &SerializedValues,
) -> Result<Vec<(Arc<Node>, Shard)>, BadQuery>
pub fn get_endpoints( &self, keyspace: &str, table: &str, partition_key: &SerializedValues, ) -> Result<Vec<(Arc<Node>, Shard)>, BadQuery>
Access to replicas owning a given partition key (similar to nodetool getendpoints
)
sourcepub fn replica_locator(&self) -> &ReplicaLocator
pub fn replica_locator(&self) -> &ReplicaLocator
Access replica location info
Trait Implementations§
source§impl Clone for ClusterData
impl Clone for ClusterData
source§fn clone(&self) -> ClusterData
fn clone(&self) -> ClusterData
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for ClusterData
impl !RefUnwindSafe for ClusterData
impl Send for ClusterData
impl Sync for ClusterData
impl Unpin for ClusterData
impl !UnwindSafe for ClusterData
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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