#[non_exhaustive]pub enum StorageTier {
InMemory,
OnDisk,
Uninitialized,
}Expand description
The current storage tier of a data structure.
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.
InMemory
Fully in RAM. Fastest access for both reads and writes.
OnDisk
On disk, accessed via mmap. The OS page cache provides warm reads. Mutations go through a WAL overlay.
Uninitialized
Not yet initialized (structure exists but has no data).
Implementations§
Source§impl StorageTier
impl StorageTier
Sourcepub fn is_in_memory(self) -> bool
pub fn is_in_memory(self) -> bool
Returns true if data is fully in RAM.
Sourcepub fn is_on_disk(self) -> bool
pub fn is_on_disk(self) -> bool
Returns true if data is served from disk (mmap).
Trait Implementations§
Source§impl Clone for StorageTier
impl Clone for StorageTier
Source§fn clone(&self) -> StorageTier
fn clone(&self) -> StorageTier
Returns a duplicate 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 StorageTier
impl Debug for StorageTier
Source§impl Hash for StorageTier
impl Hash for StorageTier
Source§impl PartialEq for StorageTier
impl PartialEq for StorageTier
impl Copy for StorageTier
impl Eq for StorageTier
impl StructuralPartialEq for StorageTier
Auto Trait Implementations§
impl Freeze for StorageTier
impl RefUnwindSafe for StorageTier
impl Send for StorageTier
impl Sync for StorageTier
impl Unpin for StorageTier
impl UnsafeUnpin for StorageTier
impl UnwindSafe for StorageTier
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§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.