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

Required Methods§

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.

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

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

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§