[−][src]Struct memfd::MemfdOptions
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]
fn clone(&self) -> MemfdOptions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MemfdOptions
[src]
impl Default for MemfdOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for MemfdOptions
impl Send for MemfdOptions
impl Sync for MemfdOptions
impl Unpin for MemfdOptions
impl UnwindSafe for MemfdOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,