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 PartialOrd for Flags
impl PartialOrd for Flags
impl Copy for Flags
impl Eq for Flags
impl StructuralPartialEq for Flags
Auto Trait Implementations§
impl Freeze for Flags
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
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