pub struct PayloadContext {
pub on_token: Option<TokenCallback>,
pub run_id: String,
pub node_id: String,
}Expand description
Context passed to payloads during execution.
Provides a token sink for streaming and metadata about the current execution.
Fields§
§on_token: Option<TokenCallback>Callback for streaming tokens. Called by the payload during execution.
The runtime sets this up to forward tokens to the EventSink.
run_id: StringThe current run ID.
node_id: StringThe current node ID.
Auto Trait Implementations§
impl !RefUnwindSafe for PayloadContext
impl !UnwindSafe for PayloadContext
impl Freeze for PayloadContext
impl Send for PayloadContext
impl Sync for PayloadContext
impl Unpin for PayloadContext
impl UnsafeUnpin for PayloadContext
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