pub trait SharedMemoryLinux {
    // Required methods
    fn from_file(file: File) -> Result<SharedMemory>;
    fn get_seals(&self) -> Result<MemfdSeals>;
    fn add_seals(&mut self, seals: MemfdSeals) -> Result<()>;
}

Required Methods§

source

fn from_file(file: File) -> Result<SharedMemory>

Constructs a SharedMemory instance from a File that represents shared memory.

The size of the resulting shared memory will be determined using File::seek. If the given file’s size can not be determined this way, this will return an error.

source

fn get_seals(&self) -> Result<MemfdSeals>

Gets the memfd seals that have already been added to this.

This may fail if this instance was not constructed from a memfd.

source

fn add_seals(&mut self, seals: MemfdSeals) -> Result<()>

Adds the given set of memfd seals.

This may fail if this instance was not constructed from a memfd with sealing allowed or if the seal seal (F_SEAL_SEAL) bit was already added.

Implementors§