Struct memfd::Memfd

source · []
pub struct Memfd { /* private fields */ }
Expand description

An anonymous volatile file, with sealing capabilities.

Implementations

Try to convert an object that owns a file descriptor into a Memfd.

This function consumes the ownership of the specified object. If the underlying file-descriptor is compatible with memfd/sealing, a Memfd object is returned. Otherwise the supplied object is returned as error.

Try to convert a File object into a Memfd.

This function consumes the ownership of the specified File. If the underlying file-descriptor is compatible with memfd/sealing, a Memfd object is returned. Otherwise the supplied File is returned for further usage.

Return a reference to the backing File.

Convert Memfd to the backing File.

Obtain the current set of seals for the Memfd.

Add a seal to the existing set of seals.

Add some seals to the existing set of seals.

Trait Implementations

Extracts the raw file descriptor. Read more

Formats the value using the given formatter. Read more

Convert a raw file-descriptor to a Memfd.

This function consumes ownership of the specified file descriptor. Memfd will take responsibility for closing it when the object goes out of scope.

Safety

fd must be a valid file descriptor representing a memfd file.

Consumes this object, returning the raw underlying file descriptor. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Returns the raw value.

Returns the raw value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Constructs Self from the raw value. Read more

Constructs Self from the raw value. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns the raw value.

Returns the raw value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.