Skip to main content

CommandLifetimeLock

Struct CommandLifetimeLock 

Source
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

Source

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.

Source

pub fn record(&self) -> &CommandCustodyRecord

Read exact Backup-owned evidence to retain before dispatch.

Source

pub fn path(&self) -> &Path

Read the retained sidecar path; dropping custody never removes it.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for CommandLifetimeLock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.