Enum libmmap::MemoryMapError [] [src]

pub enum MemoryMapError {
    FdNotAvail,
    InvalidFd,
    Unaligned,
    NoMapSupport,
    NoMem,
    ZeroLength,
    Unknown(isize),
    UnsupProt,
    UnsupOffset,
    AlreadyExists,
    VirtualAlloc(i32),
    CreateFileMappingW(i32),
    MapViewOfFile(i32),
}

Possible errors when creating a map.

Variants

The following are POSIX-specific

fd was not open for reading or, if using MapWritable, was not open for writing.

fd was not valid

Either the address given by MapAddr or offset given by MapOffset was not a multiple of MemoryMap::granularity (unaligned to page size).

With MapFd, the fd does not support mapping.

If using MapAddr, the address + min_len was outside of the process's address space. If using MapFd, the target of the fd didn't have enough resources to fulfill the request.

A zero-length map was requested. This is invalid according to POSIX. Not all platforms obey this, but this wrapper does.

Unrecognized error. The inner value is the unrecognized errno.

The following are Windows-specific

Unsupported combination of protection flags (MapReadable/MapWritable/MapExecutable).

When using MapFd, MapOffset was given (Windows does not support this at all)

When using MapFd, there was already a mapping to the file.

Unrecognized error from VirtualAlloc. The inner value is the return value of GetLastError.

Unrecognized error from CreateFileMapping. The inner value is the return value of GetLastError.

Unrecognized error from MapViewOfFile. The inner value is the return value of GetLastError.

Trait Implementations

impl Debug for MemoryMapError
[src]

Formats the value using the given formatter.

impl Clone for MemoryMapError
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for MemoryMapError
[src]

impl Display for MemoryMapError
[src]

Formats the value using the given formatter. Read more

impl Error for MemoryMapError
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more