pub fn lost()Expand description
This process’s lease was taken over by another process: from now on nothing this process
does on its way out touches the file, which is somebody else’s, and it stops claiming to be the
checkout’s server — held answers None and was_lost answers true from here
on. It serves the peers it has and ends with them; what it must not do is take on new
ones, or answer a stranger’s probe as though it were still the one.
// a process that holds no lease has nothing to lose; saying so twice changes nothing
majordomus_cli::lease::lost();
majordomus_cli::lease::lost();
assert!(majordomus_cli::lease::held().is_none());
assert!(majordomus_cli::lease::was_lost(), "it was told the lease is gone");