Enum mmap::MapError [] [src]

pub enum MapError {
    ErrFdNotAvail,
    ErrInvalidFd,
    ErrUnaligned,
    ErrNoMapSupport,
    ErrNoMem,
    ErrZeroLength,
    ErrUnknown(isize),
    ErrUnsupProt,
    ErrUnsupOffset,
    ErrAlreadyExists,
    ErrVirtualAlloc(i32),
    ErrCreateFileMappingW(i32),
    ErrMapViewOfFile(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 MapError
[src]

[]

Formats the value using the given formatter.

impl Clone for MapError
[src]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

impl Copy for MapError
[src]

impl Display for MapError
[src]

[]

Formats the value using the given formatter.

impl Error for MapError
[src]

[]

A short description of the error. Read more

[]

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