Skip to main content

acquire

Function acquire 

Source
pub fn acquire(target: &Utf8Path) -> Result<TargetLock, RkError>
Expand description

Take target for this run, or refuse.

Exclusive ownership or a refusal, never a silent pass. Where no state root resolves there is nowhere to put the lock, and a landing that proceeds anyway is the unguarded landing this module exists to stop, so it refuses before it writes.

ยงErrors

Returns a target-busy refusal where another live run holds the target, a prerequisite-unmet refusal where no state root resolves, and RkError::Io where the lock file cannot be opened.