pub struct PublishedContext(/* private fields */);Expand description
What a tool published into its dispatch context, handed back beside the
sink rather than on the wire: the driver attaches an empty one to the
sink’s scope (Dispatch::with_scope), the adapter fills it once the
tool ran, the driver reads it after the outcome. One per dispatch; a
second publish replaces the first.
Implementations§
Source§impl PublishedContext
impl PublishedContext
Sourcepub fn result_context(&self) -> Option<ToolResultContext>
pub fn result_context(&self) -> Option<ToolResultContext>
The recorder’s non-consuming snapshot. Publish before resolving the sink; values published after resolution are not part of that outcome.
Sourcepub fn publish(&self, context: ToolContext)
pub fn publish(&self, context: ToolContext)
The adapter’s write: the context after the tool ran, scopes cleared. All publication must finish before resolving the sink. Publishing afterward violates the delivery contract: consumers and recorders may observe different versions. The slot does not enforce this ordering.
Sourcepub fn take(&self) -> Option<ToolContext>
pub fn take(&self) -> Option<ToolContext>
The driver’s read: what was published, if anything, leaving nothing.
Trait Implementations§
Source§impl Debug for PublishedContext
impl Debug for PublishedContext
Auto Trait Implementations§
impl !Freeze for PublishedContext
impl RefUnwindSafe for PublishedContext
impl Send for PublishedContext
impl Sync for PublishedContext
impl Unpin for PublishedContext
impl UnsafeUnpin for PublishedContext
impl UnwindSafe for PublishedContext
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