pub fn try_lock<P: AsRef<Path>>(file_path: &LockPath<P>) -> Result<LockGuard>
Expand description
Locks the file in a non-blocking manner, i.e return an error if the file is locked.
ยงErrors
Propagates any std::io::Error
s caused by opening / locking the file.