pub fn was_lost() -> boolExpand description
Did this process hold the checkout’s lease and lose it?
The one question a server asks before taking on work that outlives the request. A
process that never held a lease answers false and goes on serving whoever asked it —
a test, a bridged client, a one-off command. One that was superseded answers true,
and from then on refuses to become anybody’s server again. It never resets: a lease
that was taken over is not given back.
// nothing has taken a lease away from the process running this example; `lost()` in
// the doctest above runs in a process of its own
assert!(!majordomus_cli::lease::was_lost());