[][src]Struct memfd::MemfdOptions

pub struct MemfdOptions { /* fields omitted */ }

A Memfd builder, providing advanced options and flags for specifying its behavior.

Methods

impl MemfdOptions[src]

pub fn new() -> Self[src]

Default set of options for Memfd creation.

The default options are:

  • sealing: F_SEAL_SEAL (i.e. no further sealing)
  • close-on-exec: false
  • hugetlb: false

pub fn allow_sealing(self, value: bool) -> Self[src]

Whether to allow sealing on the final memfd.

pub fn close_on_exec(self, value: bool) -> Self[src]

Whether to set the FD_CLOEXEC flag on the final memfd.

pub fn hugetlb(self, size: Option<HugetlbSize>) -> Self[src]

Optional hugetlb support and page size for the final memfd.

pub fn create<T: AsRef<str>>(&self, name: T) -> Result<Memfd, Error>[src]

Create a memfd according to configuration.

Trait Implementations

impl Clone for MemfdOptions[src]

impl Debug for MemfdOptions[src]

impl Default for MemfdOptions[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.