pub trait FileGuardExt { // Required methods fn upgrade(&mut self) -> Result<()>; fn try_upgrade(&mut self) -> Result<()>; }
UNIX-specific extensions to FileGuard.
FileGuard
Upgrades a lock from Shared to Exclusive.
Shared
Exclusive
If the currently held lock is already Exclusive, no change is made and the method succeeds.
Attempts to upgrade a lock from Shared to Exclusive.
If the currently held lock is already Exclusive, no change is made and the method succeeds. If the upgrade cannot be obtained without blocking, an Error of kind ErrorKind::WouldBlock is returned.
Error
ErrorKind::WouldBlock