pub struct PartialResultSink<'a, R: PartialResultRequest> { /* private fields */ }Expand description
A request-scoped, typed destination for partial result chunks.
Obtain this from ServerContext::partial_results.
Reporting is synchronous because it admits the notification to the
connection’s bounded outbound queue; transport I/O remains asynchronous.
Implementations§
Source§impl<'a, R: PartialResultRequest> PartialResultSink<'a, R>
impl<'a, R: PartialResultRequest> PartialResultSink<'a, R>
Sourcepub fn report(
&self,
chunk: <R as RequestWithPartialResults>::PartialResult,
) -> Result<(), ClientError>
pub fn report( &self, chunk: <R as RequestWithPartialResults>::PartialResult, ) -> Result<(), ClientError>
Admit one typed chunk as a $/progress notification.
The same message and exact-byte budgets as every ordinary outbound
notification apply. In particular, a full queue returns
ClientError::OutboundOverloaded and the chunk is not retained.
Auto Trait Implementations§
impl<'a, R> !RefUnwindSafe for PartialResultSink<'a, R>
impl<'a, R> !UnwindSafe for PartialResultSink<'a, R>
impl<'a, R> Freeze for PartialResultSink<'a, R>where
PhantomData<R>: Freeze,
impl<'a, R> Send for PartialResultSink<'a, R>where
PhantomData<R>: Send,
impl<'a, R> Sync for PartialResultSink<'a, R>where
PhantomData<R>: Sync,
impl<'a, R> Unpin for PartialResultSink<'a, R>where
PhantomData<R>: Unpin,
impl<'a, R> UnsafeUnpin for PartialResultSink<'a, R>where
PhantomData<R>: UnsafeUnpin,
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