pub struct TopologyRange { /* private fields */ }Expand description
One range’s routing metadata as a driver sees it.
Carries everything a driver needs to route a key directly to its owner and
fence the write at the right epoch: the half-open bounds for
client-side range routing, the owner to send to, the
replicas for read fan-out, the epoch to
stamp a write at, and the version used to decide whether an
incoming update is newer than what is cached.
Implementations§
Source§impl TopologyRange
impl TopologyRange
pub fn collection(&self) -> &CollectionId
pub fn collection_group(&self) -> &CollectionGroupId
pub fn range_id(&self) -> RangeId
pub fn shard_key_mode(&self) -> ShardKeyMode
pub fn bounds(&self) -> &RangeBounds
pub fn owner(&self) -> &NodeIdentity
pub fn range_owner(&self) -> &NodeIdentity
pub fn replicas(&self) -> &[NodeIdentity]
pub fn hot_mirror_replicas(&self) -> &[NodeIdentity]
pub fn compressed_archive_replicas(&self) -> &[NodeIdentity]
pub fn replica_role_of(&self, node: &NodeIdentity) -> Option<ReplicaRole>
pub fn promotion_candidates(&self) -> &[NodeIdentity]
Sourcepub fn epoch(&self) -> OwnershipEpoch
pub fn epoch(&self) -> OwnershipEpoch
The epoch a driver should stamp a write to this range at — the same epoch
the owner’s admit_public_write
gate will check (issue #990).
pub fn version(&self) -> CatalogVersion
Trait Implementations§
Source§impl Clone for TopologyRange
impl Clone for TopologyRange
Source§fn clone(&self) -> TopologyRange
fn clone(&self) -> TopologyRange
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 TopologyRange
impl Debug for TopologyRange
impl Eq for TopologyRange
Source§impl PartialEq for TopologyRange
impl PartialEq for TopologyRange
impl StructuralPartialEq for TopologyRange
Auto Trait Implementations§
impl Freeze for TopologyRange
impl RefUnwindSafe for TopologyRange
impl Send for TopologyRange
impl Sync for TopologyRange
impl Unpin for TopologyRange
impl UnsafeUnpin for TopologyRange
impl UnwindSafe for TopologyRange
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§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