[][src]Struct grpc::StreamingResponse

pub struct StreamingResponse<T: Send + 'static>(pub GrpcFuture<(Metadata, GrpcStreamWithTrailingMetadata<T>)>);

Streaming response

Methods

impl<T: Send + 'static> StreamingResponse<T>[src]

pub fn new<F>(f: F) -> StreamingResponse<T> where
    F: Future<Item = (Metadata, GrpcStreamWithTrailingMetadata<T>), Error = Error> + Send + 'static, 
[src]

pub fn metadata_and_stream_and_trailing_metadata<S, M>(
    metadata: Metadata,
    result: S,
    trailing: M
) -> StreamingResponse<T> where
    S: Stream<Item = T, Error = Error> + Send + 'static,
    M: Future<Item = Metadata, Error = Error> + Send + 'static, 
[src]

pub fn metadata_and_stream<S>(
    metadata: Metadata,
    result: S
) -> StreamingResponse<T> where
    S: Stream<Item = T, Error = Error> + Send + 'static, 
[src]

pub fn no_metadata<S>(s: S) -> StreamingResponse<T> where
    S: Stream<Item = T, Error = Error> + Send + 'static, 
[src]

pub fn completed_with_metadata_and_trailing_metadata(
    metadata: Metadata,
    r: Vec<T>,
    trailing: Metadata
) -> StreamingResponse<T>
[src]

pub fn completed_with_metadata(
    metadata: Metadata,
    r: Vec<T>
) -> StreamingResponse<T>
[src]

pub fn iter_with_metadata_and_trailing_metadata<I, M>(
    metadata: Metadata,
    iter: I,
    trailing: M
) -> StreamingResponse<T> where
    I: Iterator<Item = T> + Send + 'static,
    M: Future<Item = Metadata, Error = Error> + Send + 'static, 
[src]

pub fn iter_with_metadata<I>(
    metadata: Metadata,
    iter: I
) -> StreamingResponse<T> where
    I: Iterator<Item = T> + Send + 'static, 
[src]

pub fn completed(r: Vec<T>) -> StreamingResponse<T>[src]

pub fn iter<I>(iter: I) -> StreamingResponse<T> where
    I: Iterator<Item = T> + Send + 'static, 
[src]

pub fn empty() -> StreamingResponse<T>[src]

pub fn err(err: Error) -> StreamingResponse<T>[src]

Create an error response

pub fn map_items<U, F>(self, f: F) -> StreamingResponse<U> where
    U: Send + 'static,
    F: FnMut(T) -> U + Send + 'static, 
[src]

pub fn and_then_items<U, F>(self, f: F) -> StreamingResponse<U> where
    U: Send + 'static,
    F: FnMut(T) -> Result<U> + Send + 'static, 
[src]

pub fn drop_metadata(self) -> GrpcStream<T>[src]

pub fn into_future(self) -> SingleResponse<Vec<T>>[src]

pub fn single(self) -> SingleResponse<T>[src]

Take single element from stream

pub fn wait(
    self
) -> Result<(Metadata, Box<dyn Iterator<Item = Result<T>> + Send>)>
[src]

pub fn wait_drop_metadata(self) -> Box<dyn Iterator<Item = Result<T>> + Send>[src]

pub fn collect(self) -> GrpcFuture<(Metadata, Vec<T>, Metadata)>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.