pub struct DefaultSharedFileLockNameBuilder;
Expand description
This is the default implementation of the SharedFileLockNameBuilder
.
The lock file will be in the same directory of the target file and will have the same name of the target file with the prefix “.” and the suffix “.lock~”.
Implementations§
Sourcepub const LOCK_FILE_PREFIX: &'static str = "."
pub const LOCK_FILE_PREFIX: &'static str = "."
Prefix of the lock file.
Sourcepub const LOCK_FILE_SUFFIX: &'static str = ".lock~"
pub const LOCK_FILE_SUFFIX: &'static str = ".lock~"
Suffic of the lock file.
Trait Implementations§
Source§fn create_lock_file_name(&self, file_name: &OsStr) -> OsString
fn create_lock_file_name(&self, file_name: &OsStr) -> OsString
Creates the lock file name based on the original file name. It is used by
Self::create_lock_file_path()
to compose the lock file name. Read moreSource§fn create_lock_file_path(&self, file: &Path) -> Result<OsString>
fn create_lock_file_path(&self, file: &Path) -> Result<OsString>
Creates the lock file name from the target file. Read more
Source§fn get_lock_directory<'a>(&self, file: &'a Path) -> Option<&'a Path>
fn get_lock_directory<'a>(&self, file: &'a Path) -> Option<&'a Path>
Returns the lock directory. It is used by
Self::create_lock_file_path()
to
compose the lock file name. Read moreAuto 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