pub enum FileLocking {
Enabled,
Disabled,
BestEffort,
}Expand description
File-locking policy applied at file open time.
Variants§
Enabled
Acquire the lock; fail to open if it cannot be acquired (the HDF5 C-library default).
Disabled
Skip locking entirely.
BestEffort
Try to acquire the lock; on failure (filesystem doesn’t support locking, or another holder), proceed without one. Useful on NFS and similar filesystems.
Implementations§
Source§impl FileLocking
impl FileLocking
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Returns the policy implied by the HDF5_USE_FILE_LOCKING
environment variable, falling back to FileLocking::Enabled.
Sourcepub fn from_env_or(default: FileLocking) -> Self
pub fn from_env_or(default: FileLocking) -> Self
Returns the policy implied by the env var if set, otherwise default.
Trait Implementations§
Source§impl Clone for FileLocking
impl Clone for FileLocking
Source§fn clone(&self) -> FileLocking
fn clone(&self) -> FileLocking
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 Debug for FileLocking
impl Debug for FileLocking
Source§impl Default for FileLocking
impl Default for FileLocking
Source§fn default() -> FileLocking
fn default() -> FileLocking
Returns the “default value” for a type. Read more
Source§impl PartialEq for FileLocking
impl PartialEq for FileLocking
Source§fn eq(&self, other: &FileLocking) -> bool
fn eq(&self, other: &FileLocking) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FileLocking
impl Eq for FileLocking
impl StructuralPartialEq for FileLocking
Auto Trait Implementations§
impl Freeze for FileLocking
impl RefUnwindSafe for FileLocking
impl Send for FileLocking
impl Sync for FileLocking
impl Unpin for FileLocking
impl UnsafeUnpin for FileLocking
impl UnwindSafe for FileLocking
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