Enum Advice
#[repr(i32)]pub enum Advice {
Normal = 0,
Random = 1,
Sequential = 2,
WillNeed = 3,
ZeroWiredPages = 6,
}Expand description
Values supported by Mmap::advise and MmapMut::advise functions.
See madvise() map page.
Variants§
Normal = 0
MADV_NORMAL
No special treatment. This is the default.
Random = 1
MADV_RANDOM
Expect page references in random order. (Hence, read ahead may be less useful than normally.)
Sequential = 2
MADV_SEQUENTIAL
Expect page references in sequential order. (Hence, pages in the given range can be aggressively read ahead, and may be freed soon after they are accessed.)
WillNeed = 3
MADV_WILLNEED
Expect access in the near future. (Hence, it might be a good idea to read some pages ahead.)
ZeroWiredPages = 6
MADV_ZERO_WIRED_PAGES - Darwin only
Indicates that the application would like the wired pages in this address range to be
zeroed out if the address range is deallocated without first unwiring the pages (i.e.
a munmap(2) without a preceding munlock(2) or the application quits). This is used
with madvise() system call.
Trait Implementations§
impl Copy for Advice
impl Eq for Advice
impl StructuralPartialEq for Advice
Auto Trait Implementations§
impl Freeze for Advice
impl RefUnwindSafe for Advice
impl Send for Advice
impl Sync for Advice
impl Unpin for Advice
impl UnsafeUnpin for Advice
impl UnwindSafe for Advice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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