Struct memfile::CreateOptions [−][src]
pub struct CreateOptions { /* fields omitted */ }
Expand description
Options for creating a MemFile
.
Support for options depend on platform and OS details.
Refer to your OS documentation for memfd_create
for more information.
Implementations
Get the default creation options for a MemFile
.
Initially, file sealing is not enabled no no huge TLB page size is configured.
Note that the close-on-exec flag will always be set on the created file descriptor.
If you want to pass it to a child process, you should use libc::dup2
or something similar after forking.
Disabling the close-on-exec flag before forking causes a race condition with other threads.
Create a new MemFile
` with the current options.
This is a shorthand for MemFile::create
.
See that function for more details.
Create a new MemFile
` with the current options.
This is identical to Self::create
, except that it takes the name as CStr
to avoid allocations.
See MemFile::create
for more details.
Allow sealing operations on the created MemFile
.
Create the file in a hugetlbfs
filesystem using huge pages for the translation look-aside buffer.
Support for this feature and specific sizes depend on the CPU and kernel configuration. See also: https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl UnwindSafe for CreateOptions
Blanket Implementations
Mutably borrows from an owned value. Read more