pub struct Dispatch { /* private fields */ }Expand description
An effect’s identity, requested delivery mode, and driver-provided scopes. Reply transport and cancellation remain owned by the driver.
Implementations§
Source§impl Dispatch
impl Dispatch
Sourcepub fn replaced_by(&self) -> Arc<Mutex<Option<String>>> ⓘ
pub fn replaced_by(&self) -> Arc<Mutex<Option<String>>> ⓘ
The slot a layer’s replacement verdict is named in: None until a
layer replaced the answer on its way out, then that layer’s name.
The record keeps the handler’s answer regardless; this says who the
consumer’s answer is from. Shared with every inner dispatch, so a
driver reads it from the dispatch it built.
Sourcepub fn scopes(&self) -> Vec<Arc<dyn Any + Send + Sync>>
pub fn scopes(&self) -> Vec<Arc<dyn Any + Send + Sync>>
Copy the scope handles for an inline or tool dispatch.
Sourcepub fn with_observer(self, observer: Box<dyn Observe>) -> Self
pub fn with_observer(self, observer: Box<dyn Observe>) -> Self
Observe the original handler answer independently of layer verdicts.
Sourcepub fn with_adapter_context(self, context: AdapterContext) -> Self
pub fn with_adapter_context(self, context: AdapterContext) -> Self
Supply provider context for this invocation independently of request data.
Explicit context takes precedence over context supplied by an observer, regardless of installation order, and survives forwarding through layers. Reuse an operation context only for attempts of that same logical call.
Sourcepub fn adapter_context(&self) -> Option<AdapterContext>
pub fn adapter_context(&self) -> Option<AdapterContext>
Provider observation context forwarded across handler layers.
Auto Trait Implementations§
impl !RefUnwindSafe for Dispatch
impl !UnwindSafe for Dispatch
impl Freeze for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnsafeUnpin for Dispatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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