pub struct LoadOptions {
pub state_dir: Option<PathBuf>,
pub state_file_name: Option<String>,
pub state_path: Option<PathBuf>,
pub host_filesystem_prefix: Option<PathBuf>,
pub monotonic_now: Option<Arc<dyn Fn() -> Result<u64> + Send + Sync>>,
pub monotonic_label: Option<String>,
}Expand description
Configures local-host helper loading.
The zero value uses platform defaults. State paths are used only on Windows
and on FreeBSD when native kern.boot_id is unavailable.
Fields§
§state_dir: Option<PathBuf>§state_file_name: Option<String>§state_path: Option<PathBuf>§host_filesystem_prefix: Option<PathBuf>§monotonic_now: Option<Arc<dyn Fn() -> Result<u64> + Send + Sync>>§monotonic_label: Option<String>Implementations§
Source§impl LoadOptions
impl LoadOptions
pub fn with_state_dir(self, path: impl Into<PathBuf>) -> Self
pub fn with_state_file_name(self, name: impl Into<String>) -> Self
pub fn with_state_path(self, path: impl Into<PathBuf>) -> Self
Sourcepub fn with_host_filesystem_prefix(self, path: impl Into<PathBuf>) -> Self
pub fn with_host_filesystem_prefix(self, path: impl Into<PathBuf>) -> Self
Resolves Linux host identity from a mounted host filesystem prefix.
This is opt-in. When set on Linux, machine-id resolution checks
<prefix>/etc/machine-id and <prefix>/var/lib/dbus/machine-id before
the container-local paths, and boot-id resolution checks
<prefix>/proc/sys/kernel/random/boot_id before the container-local path.
pub fn with_monotonic_now( self, label: impl Into<String>, source: Arc<dyn Fn() -> Result<u64> + Send + Sync>, ) -> Self
Trait Implementations§
Source§impl Clone for LoadOptions
impl Clone for LoadOptions
Source§fn clone(&self) -> LoadOptions
fn clone(&self) -> LoadOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LoadOptions
impl Default for LoadOptions
Source§fn default() -> LoadOptions
fn default() -> LoadOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LoadOptions
impl !UnwindSafe for LoadOptions
impl Freeze for LoadOptions
impl Send for LoadOptions
impl Sync for LoadOptions
impl Unpin for LoadOptions
impl UnsafeUnpin for LoadOptions
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