pub enum FileLocking {
Enabled,
Disabled,
BestEffort,
}Expand description
Policy for OS advisory file locking when opening a file for editing.
The default is FileLocking::Enabled. The HDF5_USE_FILE_LOCKING
environment variable, when set to a recognized value, overrides the requested
policy (matching the reference HDF5 library): FALSE/0/NO/OFF disable
locking, BEST_EFFORT selects best-effort, and TRUE/1/YES/ON enable
it.
Variants§
Enabled
Acquire the lock, and fail the open with Error::Io if the filesystem
does not support locking. A lock held by another process always fails the
open with Error::FileLocked.
Disabled
Do not attempt to lock the file at all.
BestEffort
Attempt to lock, but proceed without a lock when the filesystem reports
that locking is unavailable (e.g. some NFS / network mounts). A lock that
is genuinely held by another process still fails the open. Mirrors the
reference library’s BEST_EFFORT / ignore_disabled_locks.
Trait Implementations§
Source§impl Clone for FileLocking
impl Clone for FileLocking
Source§fn clone(&self) -> FileLocking
fn clone(&self) -> FileLocking
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FileLocking
Source§impl Debug for FileLocking
impl Debug for FileLocking
Source§impl Default for FileLocking
impl Default for FileLocking
Source§fn default() -> FileLocking
fn default() -> FileLocking
impl Eq for FileLocking
Source§impl PartialEq for FileLocking
impl PartialEq for FileLocking
Source§fn eq(&self, other: &FileLocking) -> bool
fn eq(&self, other: &FileLocking) -> bool
self and other values to be equal, and is used by ==.