pub struct CommandLifetimeLock { /* private fields */ }Expand description
Exclusive custody bound to one exact journal operation.
Persist the record and dispatch intent before spawning; paid-call authority, argv, output bounds, deadlines and reaping remain integration-owned.
Implementations§
Source§impl CommandLifetimeLock
impl CommandLifetimeLock
Sourcepub fn acquire(
journal: &Path,
operation_sequence: u64,
) -> Result<Self, CommandLifetimeLockError>
pub fn acquire( journal: &Path, operation_sequence: u64, ) -> Result<Self, CommandLifetimeLockError>
Acquire the operation’s regular no-follow sidecar without waiting.
§Errors
Rejects unsafe journals, contention, invalid identity and native I/O failures.
Sourcepub fn record(&self) -> &CommandCustodyRecord
pub fn record(&self) -> &CommandCustodyRecord
Read exact Backup-owned evidence to retain before dispatch.
Sourcepub fn spawn(
&mut self,
command: Command,
) -> Result<Child, CommandLifetimeLockError>
pub fn spawn( &mut self, command: Command, ) -> Result<Child, CommandLifetimeLockError>
Attempt one command with Host-owned descriptor inheritance and no retry.
A failed spawn consumes the single allowance. Descendants must preserve the inherited descriptor; callers retain admission, deadlines and reaping.
§Errors
Rejects repeated dispatch, replaced sidecars and native spawn failures.
Sourcepub fn finish(self) -> Result<CommandQuiescenceGuard, CommandLifetimeLockError>
pub fn finish(self) -> Result<CommandQuiescenceGuard, CommandLifetimeLockError>
Close owner custody and probe exact quiescence with Backup’s bounded grace.
Only contention is retried for 250 ms at 5 ms intervals. Failure preserves the sidecar and establishes no remote effect outcome or retry authority.
§Errors
Rejects active inherited holders, changed identities and native I/O failures.