pub struct StreamingResponse<T: Send + 'static>(pub GrpcFuture<(Metadata, GrpcStreamWithTrailingMetadata<T>)>);Expand description
Streaming response
Tuple Fields§
§0: GrpcFuture<(Metadata, GrpcStreamWithTrailingMetadata<T>)>Initial metadata, stream of items followed by trailing metadata
Implementations§
Source§impl<T: Send + 'static> StreamingResponse<T>
impl<T: Send + 'static> StreamingResponse<T>
pub fn new<F>(f: F) -> StreamingResponse<T>
pub fn metadata_and_stream_and_trailing_metadata<S, M>( metadata: Metadata, result: S, trailing: M, ) -> StreamingResponse<T>
pub fn metadata_and_stream<S>( metadata: Metadata, result: S, ) -> StreamingResponse<T>
pub fn no_metadata<S>(s: S) -> StreamingResponse<T>
pub fn completed_with_metadata_and_trailing_metadata( metadata: Metadata, r: Vec<T>, trailing: Metadata, ) -> StreamingResponse<T>
pub fn completed_with_metadata( metadata: Metadata, r: Vec<T>, ) -> StreamingResponse<T>
pub fn iter_with_metadata_and_trailing_metadata<I, M>( metadata: Metadata, iter: I, trailing: M, ) -> StreamingResponse<T>
pub fn iter_with_metadata<I>( metadata: Metadata, iter: I, ) -> StreamingResponse<T>
pub fn completed(r: Vec<T>) -> StreamingResponse<T>
pub fn iter<I>(iter: I) -> StreamingResponse<T>
pub fn empty() -> StreamingResponse<T>
Sourcepub fn err(err: Error) -> StreamingResponse<T>
pub fn err(err: Error) -> StreamingResponse<T>
Create an error response
pub fn map_items<U, F>(self, f: F) -> StreamingResponse<U>
pub fn and_then_items<U, F>(self, f: F) -> StreamingResponse<U>
pub fn drop_metadata(self) -> GrpcStream<T>
pub fn into_future(self) -> SingleResponse<Vec<T>> ⓘ
Sourcepub fn single(self) -> SingleResponse<T> ⓘ
pub fn single(self) -> SingleResponse<T> ⓘ
Take single element from stream
pub fn collect(self) -> GrpcFuture<(Metadata, Vec<T>, Metadata)>
Auto Trait Implementations§
impl<T> Freeze for StreamingResponse<T>
impl<T> !RefUnwindSafe for StreamingResponse<T>
impl<T> Send for StreamingResponse<T>
impl<T> !Sync for StreamingResponse<T>
impl<T> Unpin for StreamingResponse<T>
impl<T> !UnwindSafe for StreamingResponse<T>
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