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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more