pub struct DirectContext { /* private fields */ }Expand description
State backing direct (in-process) extension dispatch.
Direct dispatch has no session or wire boundary, so unlike the remote
path it carries no cancellation-signal machinery: a caller cancels a
direct extension call the ordinary Rust way, by dropping the awaited
future, and that drop already propagates through any .await inside the
handler. ExtContext::cancel_guard on the direct path is
therefore just a passthrough, kept only so extension authors can write
one cancel_guard call that works, unmodified, under both dispatch modes.
Trait Implementations§
Source§impl Default for DirectContext
impl Default for DirectContext
Source§fn default() -> DirectContext
fn default() -> DirectContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DirectContext
impl RefUnwindSafe for DirectContext
impl Send for DirectContext
impl Sync for DirectContext
impl Unpin for DirectContext
impl UnsafeUnpin for DirectContext
impl UnwindSafe for DirectContext
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
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