Skip to main content

OwnedFinalization

Struct OwnedFinalization 

Source
pub struct OwnedFinalization<T> { /* private fields */ }
Expand description

Encoded bytes and the child, retained through pending or failed cleanup. No generic result value has been deserialized in the parent.

Implementations§

Source§

impl<T> OwnedFinalization<T>

Source

pub fn provisional_bytes(&self) -> &[u8] ⓘ

Exact bytes received so far, which are not a decoded result or authority.

Source

pub fn result_eof(&self) -> bool

Whether an actual EOF completed result acquisition.

Source

pub fn result_reader_abandoned(&self) -> bool

Whether cleanup abandoned an unread result reader because a failed owner lacked a pidfd. Collected bytes and the first failure stay intact; abandonment is not EOF, cancellation, or proof of child termination.

Source

pub fn cleanup(&self) -> &OwnedContainerCleanup

Borrows diagnostic identity and cleanup observations without disarming ownership.

Source

pub fn failure(&self) -> Option<OwnedRunFailure>

The frozen original failure, if one was observed.

Source

pub fn retry_until(self, deadline: Instant) -> OwnedFinalize<T>

Retries observation/cancellation while preserving bytes and the original child identity, with unread-reader abandonment only as described below. A previously failed result stays failed even if cleanup later succeeds. If that failed owner has no pidfd, close its unread result reader before waiting: retaining it could block the child serializer forever while waiting for that same child. This preserves the original wait and bytes, but permits the child to observe a broken pipe. It does not guarantee arbitrary workers or a child ignoring write failures will terminate.

Source

pub fn cancel_until(self, deadline: Instant) -> OwnedFinalize<T>

Cancels through the original owner up to the absolute deadline. An earlier failure takes precedence; otherwise cancellation becomes the sticky failure even if C subsequently exits successfully. A returned failed owner can still be pending cleanup and must be retained or retried.

Trait Implementations§

Source§

impl<T> Debug for OwnedFinalization<T>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Drop for OwnedFinalization<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<T> Freeze for OwnedFinalization<T>
where PhantomData<fn() -> T>: Freeze,

§

impl<T> RefUnwindSafe for OwnedFinalization<T>
where PhantomData<fn() -> T>: RefUnwindSafe,

§

impl<T> Send for OwnedFinalization<T>
where PhantomData<fn() -> T>: Send,

§

impl<T> Sync for OwnedFinalization<T>
where PhantomData<fn() -> T>: Sync,

§

impl<T> Unpin for OwnedFinalization<T>
where PhantomData<fn() -> T>: Unpin,

§

impl<T> UnsafeUnpin for OwnedFinalization<T>
where PhantomData<fn() -> T>: UnsafeUnpin,

§

impl<T> UnwindSafe for OwnedFinalization<T>
where PhantomData<fn() -> T>: UnwindSafe,

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, 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.