Enum memmap::Protection [] [src]

pub enum Protection {
    Read,
    ReadWrite,
    ReadCopy,
}

Memory map protection.

Determines how a memory map may be used. If the memory map is backed by a file, then the file must have permissions corresponding to the operations the protection level allows.

Variants

Read

A read-only memory map. Writes to the memory map will result in a panic.

ReadWrite

A read-write memory map. Writes to the memory map will be reflected in the file after a call to Mmap::flush or after the Mmap is dropped.

ReadCopy

A read, copy-on-write memory map. Writes to the memory map will not be carried through to the underlying file. It is unspecified whether changes made to the file after the memory map is created will be visible.

Methods

impl Protection

fn write(self) -> bool

Returns true if the Protection is writable.

Trait Implementations

Derived Implementations

impl Eq for Protection

impl PartialEq for Protection

fn eq(&self, __arg_0: &Protection) -> bool

1.0.0fn ne(&self, other: &Rhs) -> bool

impl Debug for Protection

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for Protection

impl Clone for Protection

fn clone(&self) -> Protection

1.0.0fn clone_from(&mut self, source: &Self)