Skip to main content

DetachedCallbacks

Struct DetachedCallbacks 

Source
pub struct DetachedCallbacks { /* private fields */ }
Expand description

Observable ownership of a sealed callback domain after timed shutdown.

The public observation handle is unique and deliberately not Clone, keeping DLL-unload and final-wait responsibility obvious. The sealed callback domain itself remains self-owned.

ⓘ
use nbreq::DetachedCallbacks;
fn require_clone<T: Clone>() {}
require_clone::<DetachedCallbacks>();

This value contains no Engine, network, resolver, TLS, or backend state. Dropping it does not interrupt callbacks; the callback domain remains self-owned until complete.

Implementations§

Source§

impl DetachedCallbacks

Source

pub fn is_complete(&self) -> bool

Returns whether all callbacks have returned and workers have exited.

Source

pub fn wait(&self) -> Result<(), ShutdownError>

Waits without a library-imposed timeout for the sealed domain to complete.

Source

pub fn wait_for(&self, duration: Duration) -> Result<bool, ShutdownError>

Waits up to duration, returning true only after callback workers have exited and joined.

Trait Implementations§

Source§

impl Debug for DetachedCallbacks

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