#[non_exhaustive]pub struct SharedOptions {
pub deadline: Duration,
pub allow_network_fs: bool,
pub cancel: Option<CancelToken>,
}Expand description
Options for a shared-mode handle (12.4).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.deadline: DurationHow long one call may wait for the file’s lock before it fails with
MnemoError::Locked. One deadline covers both locks and the
retries after a compaction. Default 10 s; hooks pass 2 s.
allow_network_fs: boolUse shared mode on a network or synced filesystem anyway, where the lock may not reach every process that opens the file.
The check refuses network filesystems (on Linux, anything but ext4, xfs, btrfs, tmpfs, f2fs, overlayfs and zfs; overlayfs assumes Linux 4.19 or later) and, on macOS, iCloud Drive and File Provider folders. On Windows it refuses UNC paths; a drive letter mapped to a network share may not be detected.
cancel: Option<CancelToken>Cancels the handle’s waiting calls from another thread.
Trait Implementations§
Auto Trait Implementations§
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