pub struct ReadyProc<'a, H: ProcHandle> { /* private fields */ }Expand description
Capability proving a proc is ready.
ReadyProc::ensure validates that addr() and agent_ref()
are available; this type carries that proof, providing infallible
accessors.
Obtain a ReadyProc by calling ready_proc(&handle).await.
Implementations§
Source§impl<'a, H: ProcHandle> ReadyProc<'a, H>
impl<'a, H: ProcHandle> ReadyProc<'a, H>
Sourcepub async fn ensure(
handle: &'a H,
) -> Result<ReadyProc<'a, H>, ReadyProcError<H::TerminalStatus>>
pub async fn ensure( handle: &'a H, ) -> Result<ReadyProc<'a, H>, ReadyProcError<H::TerminalStatus>>
Wait for a proc to become ready, then return a capability that
provides infallible access to addr() and agent_ref().
This is the type-safe way to obtain the proc’s address and
agent reference. After this function returns Ok(ready), both
ready.addr() and ready.agent_ref() are guaranteed to
succeed.
Sourcepub fn addr(&self) -> &ChannelAddr
pub fn addr(&self) -> &ChannelAddr
The proc’s address (guaranteed available after ready).
Auto Trait Implementations§
impl<'a, H> Freeze for ReadyProc<'a, H>
impl<'a, H> RefUnwindSafe for ReadyProc<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for ReadyProc<'a, H>
impl<'a, H> Sync for ReadyProc<'a, H>
impl<'a, H> Unpin for ReadyProc<'a, H>
impl<'a, H> UnwindSafe for ReadyProc<'a, H>where
H: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more