Struct memfd::MemfdOptions
source · [−]pub struct MemfdOptions { /* private fields */ }
Expand description
A Memfd
builder, providing advanced options and flags for specifying its behavior.
Implementations
sourceimpl MemfdOptions
impl MemfdOptions
sourcepub const fn new() -> Self
pub const fn new() -> Self
Default set of options for Memfd
creation.
The default options are:
FileSeal::SealSeal
(i.e. no further sealing);- close-on-exec is disabled;
- hugetlb is disabled.
sourcepub const fn allow_sealing(self, value: bool) -> Self
pub const fn allow_sealing(self, value: bool) -> Self
Whether to allow adding seals to the created Memfd
.
sourcepub const fn close_on_exec(self, value: bool) -> Self
pub const fn close_on_exec(self, value: bool) -> Self
Whether to set the FD_CLOEXEC
flag on the created Memfd
.
sourcepub const fn hugetlb(self, size: Option<HugetlbSize>) -> Self
pub const fn hugetlb(self, size: Option<HugetlbSize>) -> Self
Optional hugetlb support and page size for the created Memfd
.
Trait Implementations
sourceimpl Clone for MemfdOptions
impl Clone for MemfdOptions
sourcefn clone(&self) -> MemfdOptions
fn clone(&self) -> MemfdOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MemfdOptions
impl Debug for MemfdOptions
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more