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
[src]

fn write(self) -> bool

Returns true if the Protection is writable.

Trait Implementations

impl Eq for Protection
[src]

impl PartialEq for Protection
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Debug for Protection
[src]

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

Formats the value using the given formatter.

impl Copy for Protection
[src]

impl Clone for Protection
[src]

fn clone(&self) -> Protection

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more