#[non_exhaustive]pub enum NodeAddr {
Translatable(SocketAddr),
Untranslatable(SocketAddr),
}
Expand description
This enum is introduced to support address translation only upon opening a connection,
as well as to cope with a bug present in older Cassandra and Scylla releases.
The bug involves misconfiguration of rpc_address and/or broadcast_rpc_address
in system.local to 0.0.0.0. Mitigation involves replacing the faulty address
with connection’s address, but then that address must not be subject to AddressTranslator
,
so we carry that information using this enum. Address translation is never performed
on Untranslatable
variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Translatable(SocketAddr)
Fetched in Metadata with query_peers()
(broadcast by a node itself).
Untranslatable(SocketAddr)
Built from control connection’s address upon query_peers()
in order to mitigate the bug described above.
Implementations§
Trait Implementations§
source§impl Ord for NodeAddr
impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
impl PartialEq for NodeAddr
source§impl PartialOrd for NodeAddr
impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NodeAddr
impl Eq for NodeAddr
impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
impl Freeze for NodeAddr
impl RefUnwindSafe for NodeAddr
impl Send for NodeAddr
impl Sync for NodeAddr
impl Unpin for NodeAddr
impl UnwindSafe for NodeAddr
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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