pub enum PrefetchMode {
Off,
Sequential,
WillNeed,
Auto,
}Expand description
Selects the read-ahead hint applied to the active disk-access backend.
See StorageConfig::prefetch. Sequential / WillNeed map to the
corresponding madvise(2) advice on the mmap backend; on the direct-I/O
backend any non-Off value enables the StorageConfig::direct_io_prefetch_bytes
read-ahead window.
Variants§
Off
No explicit prefetch hint; rely on default kernel behaviour.
Sequential
Hint sequential access (aggressive read-ahead, drop-behind).
WillNeed
Hint that the mapped/region bytes will be needed soon (eager fault-in).
Auto
Let the backend choose: sequential advice for mmap, windowed read-ahead for direct I/O.
Trait Implementations§
Source§impl Clone for PrefetchMode
impl Clone for PrefetchMode
Source§fn clone(&self) -> PrefetchMode
fn clone(&self) -> PrefetchMode
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 PrefetchMode
Source§impl Debug for PrefetchMode
impl Debug for PrefetchMode
Source§impl Default for PrefetchMode
impl Default for PrefetchMode
Source§fn default() -> PrefetchMode
fn default() -> PrefetchMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PrefetchMode
impl<'de> Deserialize<'de> for PrefetchMode
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 PrefetchMode
Source§impl PartialEq for PrefetchMode
impl PartialEq for PrefetchMode
Source§fn eq(&self, other: &PrefetchMode) -> bool
fn eq(&self, other: &PrefetchMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PrefetchMode
impl Serialize for PrefetchMode
impl StructuralPartialEq for PrefetchMode
Auto Trait Implementations§
impl Freeze for PrefetchMode
impl RefUnwindSafe for PrefetchMode
impl Send for PrefetchMode
impl Sync for PrefetchMode
impl Unpin for PrefetchMode
impl UnsafeUnpin for PrefetchMode
impl UnwindSafe for PrefetchMode
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.