pub struct StreamingInvocation { /* private fields */ }Expand description
Wrapper around an in-flight streaming invocation. Yields raw body
chunks via Self::next_chunk until the RIE closes the response,
at which point the final Ok(None) signals the caller to emit the
terminal InvokeComplete frame.
Implementations§
Source§impl StreamingInvocation
impl StreamingInvocation
Sourcepub async fn next_chunk(&mut self) -> Result<Option<Bytes>, RuntimeError>
pub async fn next_chunk(&mut self) -> Result<Option<Bytes>, RuntimeError>
Read the next chunk of the function’s response body. Returns
Ok(None) once the RIE has finished streaming. Buffered
handlers tend to deliver a single chunk; streaming handlers
deliver one chunk per responseStream.write(...) call.
Auto Trait Implementations§
impl Freeze for StreamingInvocation
impl !RefUnwindSafe for StreamingInvocation
impl Send for StreamingInvocation
impl Sync for StreamingInvocation
impl Unpin for StreamingInvocation
impl UnsafeUnpin for StreamingInvocation
impl !UnwindSafe for StreamingInvocation
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> 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>
Converts
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>
Converts
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