pub struct MlockConfig { /* private fields */ }Expand description
Configuration for memory locking operations.
Use MlockConfig::builder() for a fluent configuration API:
use duende_mlock::MlockConfig;
let config = MlockConfig::builder()
.current(true) // Lock pages currently mapped
.future(true) // Lock pages mapped in the future
.required(false) // Don't fail if mlock fails
.build();Implementations§
Source§impl MlockConfig
impl MlockConfig
Sourcepub const fn builder() -> MlockConfigBuilder
pub const fn builder() -> MlockConfigBuilder
Create a new configuration builder.
§Example
use duende_mlock::MlockConfig;
let config = MlockConfig::builder()
.required(false)
.build();Trait Implementations§
Source§impl Clone for MlockConfig
impl Clone for MlockConfig
Source§fn clone(&self) -> MlockConfig
fn clone(&self) -> MlockConfig
Returns a duplicate 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 MlockConfig
impl Debug for MlockConfig
Source§impl Default for MlockConfig
impl Default for MlockConfig
Source§impl PartialEq for MlockConfig
impl PartialEq for MlockConfig
impl Copy for MlockConfig
impl Eq for MlockConfig
impl StructuralPartialEq for MlockConfig
Auto Trait Implementations§
impl Freeze for MlockConfig
impl RefUnwindSafe for MlockConfig
impl Send for MlockConfig
impl Sync for MlockConfig
impl Unpin for MlockConfig
impl UnwindSafe for MlockConfig
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