pub struct MemfdOptions { /* private fields */ }
Expand description
A Memfd
builder, providing advanced options and flags for specifying its behavior.
Implementations§
source§impl 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 enabled;
- 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§
source§impl Clone for MemfdOptions
impl Clone for MemfdOptions
source§fn clone(&self) -> MemfdOptions
fn clone(&self) -> MemfdOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MemfdOptions
impl Debug for MemfdOptions
Auto Trait Implementations§
impl Freeze for MemfdOptions
impl RefUnwindSafe for MemfdOptions
impl Send for MemfdOptions
impl Sync for MemfdOptions
impl Unpin for MemfdOptions
impl UnwindSafe for MemfdOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)