pub struct BufferedTextStream { /* private fields */ }Expand description
Batches text chunks during one Step invocation.
Self::write blocks only on the Worker’s bounded output queue. It does not wait for Dex Stream
Store acknowledgement. The Worker automatically flushes the tail before returning the handler
result or error.
Implementations§
Source§impl BufferedTextStream
impl BufferedTextStream
Sourcepub fn write(&self, chunk: impl AsRef<str>) -> HandlerResult<()>
pub fn write(&self, chunk: impl AsRef<str>) -> HandlerResult<()>
Appends one chunk and flushes after crossing the soft UTF-8 size threshold.
Empty chunks are ignored. The first nonempty chunk starts a one-shot timer.
§Errors
Returns HandlerError after cancellation, invocation completion, or output failure.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BufferedTextStream
impl !UnwindSafe for BufferedTextStream
impl Freeze for BufferedTextStream
impl Send for BufferedTextStream
impl Sync for BufferedTextStream
impl Unpin for BufferedTextStream
impl UnsafeUnpin for BufferedTextStream
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request