Trait file_guard::os::unix::FileGuardExt[][src]

pub trait FileGuardExt {
    fn upgrade(&mut self) -> Result<()>;
fn try_upgrade(&mut self) -> Result<()>; }
Expand description

UNIX-specific extensions to FileGuard.

Required methods

Upgrades a lock from Shared to 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.

Implementors