Enum mapped_file::Flags
source · [−]pub enum Flags {
Shared,
Private,
}Expand description
Flags for mapping a file descriptor.
Variants
Shared
Private
Implementations
sourceimpl Flags
impl Flags
sourcepub unsafe fn chain_with(self, flags: impl MapFlags) -> impl MapFlags
pub unsafe fn chain_with(self, flags: impl MapFlags) -> impl MapFlags
Add these flags to another MapFlags provider’s mask.
Safety
The caller should ensure there are no conflicting flags present in the bitwise OR of self and flags’s respective masks; if there are, then mmap() may fail. This will not result in unexpected mapping behaviour, but will cause an error.
However, the caller must ensure there are no overlapping bits in the resulting mask, as that may produce a valid but unexpected combined mask.
hugetlb support
For adding huge-page mapping flags to these, use with_hugetlb() instead.
Trait Implementations
sourceimpl Ord for Flags
impl Ord for Flags
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Flags> for Flags
impl PartialOrd<Flags> for Flags
sourcefn partial_cmp(&self, other: &Flags) -> Option<Ordering>
fn partial_cmp(&self, other: &Flags) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moreimpl Copy for Flags
impl Eq for Flags
impl StructuralEq for Flags
impl StructuralPartialEq for Flags
Auto Trait Implementations
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more