Enum mapped_file::Flags
source · pub enum Flags {
Shared,
Private,
}Expand description
Flags for mapping a file descriptor.
Variants§
Private
Implementations§
source§impl 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§
source§impl Ord for Flags
impl Ord for Flags
source§impl PartialEq<Flags> for Flags
impl PartialEq<Flags> for Flags
source§impl PartialOrd<Flags> for Flags
impl PartialOrd<Flags> for Flags
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 more