Struct memfd::Memfd [−][src]
pub struct Memfd { /* fields omitted */ }
An anonymous volatile file, with sealing capabilities.
Methods
impl Memfd
[src]
impl Memfd
pub fn try_from_file(fp: File) -> Either<Self, File>
[src]
pub fn try_from_file(fp: File) -> Either<Self, File>
Try to convert a File
object into a Memfd
.
This requires transferring ownership of the File
.
If the underlying file-descriptor is compatible with
memfd/sealing, it returns a proper Memfd
object,
otherwise it transfers back ownership of the original
File
for further usage.
pub fn as_file(&self) -> &File
[src]
pub fn as_file(&self) -> &File
Return a File
object for this memfd.
pub fn into_file(self) -> File
[src]
pub fn into_file(self) -> File
Consume this Memfd
, returning the underlying File
.
pub fn seals(&self) -> Result<SealsHashSet>
[src]
pub fn seals(&self) -> Result<SealsHashSet>
Return the current set of seals.
pub fn add_seal(&self, seal: FileSeal) -> Result<()>
[src]
pub fn add_seal(&self, seal: FileSeal) -> Result<()>
Add a single seal to the existing set of seals.
pub fn add_seals(&self, seals: &SealsHashSet) -> Result<()>
[src]
pub fn add_seals(&self, seals: &SealsHashSet) -> Result<()>
Add some seals to the existing set of seals.