[][src]Struct memfd::Memfd

pub struct Memfd { /* fields omitted */ }

An anonymous volatile file, with sealing capabilities.

Methods

impl Memfd[src]

pub fn try_from_file(fp: File) -> Either<Self, File>[src]

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]

Return a File object for this memfd.

pub fn into_file(self) -> File[src]

Consume this Memfd, returning the underlying File.

pub fn seals(&self) -> Result<SealsHashSet, Error>[src]

Return the current set of seals.

pub fn add_seal(&self, seal: FileSeal) -> Result<(), Error>[src]

Add a single seal to the existing set of seals.

pub fn add_seals(&self, seals: &SealsHashSet) -> Result<(), Error>[src]

Add some seals to the existing set of seals.

Trait Implementations

impl Debug for Memfd[src]

Auto Trait Implementations

impl RefUnwindSafe for Memfd

impl Send for Memfd

impl Sync for Memfd

impl Unpin for Memfd

impl UnwindSafe for Memfd

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.