Enum timecat::utils::CacheTableSize
source · pub enum CacheTableSize {
Max(usize),
Min(usize),
Round(usize),
Exact(usize),
}Variants§
Implementations§
source§impl CacheTableSize
impl CacheTableSize
pub const fn unwrap(self) -> usize
pub const fn is_min(self) -> bool
pub const fn is_max(self) -> bool
pub const fn is_round(self) -> bool
pub const fn is_exact(self) -> bool
pub const fn get_entry_size<T: Copy + Clone + PartialEq>() -> usize
pub fn to_cache_table_and_entry_size<T: Copy + Clone + PartialEq>( self ) -> (usize, usize)
pub fn to_cache_table_size<T: Copy + Clone + PartialEq>(self) -> usize
pub fn to_cache_table_memory_size<T: Copy + Clone + PartialEq>(self) -> usize
Trait Implementations§
source§impl Clone for CacheTableSize
impl Clone for CacheTableSize
source§fn clone(&self) -> CacheTableSize
fn clone(&self) -> CacheTableSize
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 moresource§impl Debug for CacheTableSize
impl Debug for CacheTableSize
source§impl<'de> Deserialize<'de> for CacheTableSize
impl<'de> Deserialize<'de> for CacheTableSize
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
source§impl Display for CacheTableSize
impl Display for CacheTableSize
source§impl Ord for CacheTableSize
impl Ord for CacheTableSize
source§fn cmp(&self, other: &CacheTableSize) -> Ordering
fn cmp(&self, other: &CacheTableSize) -> Ordering
1.21.0 · 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
source§impl PartialEq for CacheTableSize
impl PartialEq for CacheTableSize
source§fn eq(&self, other: &CacheTableSize) -> bool
fn eq(&self, other: &CacheTableSize) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for CacheTableSize
impl PartialOrd for CacheTableSize
source§fn partial_cmp(&self, other: &CacheTableSize) -> Option<Ordering>
fn partial_cmp(&self, other: &CacheTableSize) -> Option<Ordering>
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 moresource§impl Serialize for CacheTableSize
impl Serialize for CacheTableSize
impl Copy for CacheTableSize
impl Eq for CacheTableSize
impl StructuralPartialEq for CacheTableSize
Auto Trait Implementations§
impl Freeze for CacheTableSize
impl RefUnwindSafe for CacheTableSize
impl Send for CacheTableSize
impl Sync for CacheTableSize
impl Unpin for CacheTableSize
impl UnwindSafe for CacheTableSize
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> CustomColorize for Twhere
T: ToString,
impl<T> CustomColorize for Twhere
T: ToString,
fn colorize( &self, style_functions: &[fn(_: ColoredString) -> ColoredString] ) -> String
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