pub enum StreamItem {
Chunk(Bytes),
End,
Error(RpcResponsePayload),
}Expand description
One item delivered to a streaming caller. The caller’s
RpcStream translates these into Stream::Item = Result<Bytes, RpcError> plus stream termination.
Variants§
Chunk(Bytes)
Non-terminal chunk — a body slice from the server.
End
Terminal frame, server signaled clean stream end.
Error(RpcResponsePayload)
Terminal frame with a non-Ok status. Body is the
server’s diagnostic; status is the wire RpcStatus value.
Trait Implementations§
Source§impl Clone for StreamItem
impl Clone for StreamItem
Source§fn clone(&self) -> StreamItem
fn clone(&self) -> StreamItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StreamItem
impl RefUnwindSafe for StreamItem
impl Send for StreamItem
impl Sync for StreamItem
impl Unpin for StreamItem
impl UnsafeUnpin for StreamItem
impl UnwindSafe for StreamItem
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