pub struct StreamContext {
pub progress: ProgressSender,
pub cancellation: CancellationToken,
}Expand description
Context passed to streaming tool handlers.
Provides a progress sender for emitting updates and a cancellation token for checking whether the client has cancelled the request.
Fields§
§progress: ProgressSender§cancellation: CancellationTokenTrait Implementations§
Source§impl Clone for StreamContext
impl Clone for StreamContext
Source§fn clone(&self) -> StreamContext
fn clone(&self) -> StreamContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StreamContext
impl RefUnwindSafe for StreamContext
impl Send for StreamContext
impl Sync for StreamContext
impl Unpin for StreamContext
impl UnsafeUnpin for StreamContext
impl UnwindSafe for StreamContext
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