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§
Sourcefn from_file(file: File) -> Result<SharedMemory>
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.
Sourcefn get_seals(&self) -> Result<MemfdSeals>
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.
Sourcefn add_seals(&mut self, seals: MemfdSeals) -> Result<()>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.