Trait kernel::ReadWrite[][src]

pub trait ReadWrite: Read {
    fn mut_map_or<F, R>(&mut self, default: R, fun: F) -> R
    where
        F: FnOnce(&mut [u8]) -> R
; }

A readable and writable region of userspace memory.

This trait can be used to gain read-write access to memory regions wrapped in an AppSlice type.

This is a supertrait of Read, which features further methods.

Required methods

fn mut_map_or<F, R>(&mut self, default: R, fun: F) -> R where
    F: FnOnce(&mut [u8]) -> R, 
[src]

Applies a function to the mutable slice reference pointed to by the AppSlice.

If the process is no longer alive and the memory has been reclaimed, this method must return the default value.

Default AppSlice

A default instance of an AppSlice must return the passed default value without executing the closure.

Loading content...

Implementors

impl ReadWrite for ReadWriteAppSlice[src]

Loading content...