Enum userfaultfd::Event[][src]

pub enum Event {
    Pagefault {
        rw: ReadWrite,
        addr: *mut c_void,
    },
    Fork {
        uffd: Uffd,
    },
    Remap {
        from: *mut c_void,
        to: *mut c_void,
        len: usize,
    },
    Remove {
        start: *mut c_void,
        end: *mut c_void,
    },
    Unmap {
        start: *mut c_void,
        end: *mut c_void,
    },
}

Events from the userfaultfd object that are read by Uffd::read_event().

Variants

Pagefault

A pagefault event.

Fields of Pagefault

rw: ReadWrite

Whether the fault is on a read or a write.

addr: *mut c_void

The address that triggered the fault.

Fork

Generated when the faulting process invokes fork(2) (or clone(2) without the CLONE_VM flag).

Fields of Fork

uffd: Uffd

The Uffd object created for the child by fork(2)

Remap

Generated when the faulting process invokes mremap(2).

Fields of Remap

from: *mut c_void

The original address of the memory range that was remapped.

to: *mut c_void

The new address of the memory range that was remapped.

len: usize

The original length of the memory range that was remapped.

Remove

Generated when the faulting process invokes madvise(2) with MADV_DONTNEED or MADV_REMOVE advice.

Fields of Remove

start: *mut c_void

The start address of the memory range that was freed.

end: *mut c_void

The end address of the memory range that was freed.

Unmap

Generated when the faulting process unmaps a meomry range, either explicitly using munmap(2) or implicitly during mmap(2) or mremap(2).

Fields of Unmap

start: *mut c_void

The start address of the memory range that was unmapped.

end: *mut c_void

The end address of the memory range that was unmapped.

Trait Implementations

impl Debug for Event[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.