pub struct CacheRankIdentity { /* private fields */ }Expand description
Optional rank identity included in a stable cache block identifier.
Implementations§
Source§impl CacheRankIdentity
impl CacheRankIdentity
Sourcepub const fn new(
stage_rank: Option<usize>,
shard_rank: Option<usize>,
addressable_rank: Option<usize>,
) -> Self
pub const fn new( stage_rank: Option<usize>, shard_rank: Option<usize>, addressable_rank: Option<usize>, ) -> Self
Creates a generic rank identity for persisted cache state.
Sourcepub const fn stage_rank(&self) -> Option<usize>
pub const fn stage_rank(&self) -> Option<usize>
Returns the ordered-stage rank, when present.
Sourcepub const fn shard_rank(&self) -> Option<usize>
pub const fn shard_rank(&self) -> Option<usize>
Returns the state-shard rank, when present.
Sourcepub const fn addressable_rank(&self) -> Option<usize>
pub const fn addressable_rank(&self) -> Option<usize>
Returns the addressable-group rank, when present.
Trait Implementations§
Source§impl Clone for CacheRankIdentity
impl Clone for CacheRankIdentity
Source§fn clone(&self) -> CacheRankIdentity
fn clone(&self) -> CacheRankIdentity
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 moreimpl Copy for CacheRankIdentity
Source§impl Debug for CacheRankIdentity
impl Debug for CacheRankIdentity
Source§impl<'de> Deserialize<'de> for CacheRankIdentity
impl<'de> Deserialize<'de> for CacheRankIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CacheRankIdentity
Source§impl Hash for CacheRankIdentity
impl Hash for CacheRankIdentity
Source§impl Ord for CacheRankIdentity
impl Ord for CacheRankIdentity
Source§fn cmp(&self, other: &CacheRankIdentity) -> Ordering
fn cmp(&self, other: &CacheRankIdentity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CacheRankIdentity
impl PartialEq for CacheRankIdentity
Source§impl PartialOrd for CacheRankIdentity
impl PartialOrd for CacheRankIdentity
Source§impl Serialize for CacheRankIdentity
impl Serialize for CacheRankIdentity
impl StructuralPartialEq for CacheRankIdentity
Auto Trait Implementations§
impl Freeze for CacheRankIdentity
impl RefUnwindSafe for CacheRankIdentity
impl Send for CacheRankIdentity
impl Sync for CacheRankIdentity
impl Unpin for CacheRankIdentity
impl UnsafeUnpin for CacheRankIdentity
impl UnwindSafe for CacheRankIdentity
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