[][src]Struct grpc::SingleResponse

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

Single message response

Methods

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

pub fn new<F>(f: F) -> SingleResponse<T> where
    F: Future<Output = Result<(Metadata, GrpcFuture<(T, Metadata)>)>> + Send + 'static, 
[src]

pub fn metadata_and_future<F>(
    metadata: Metadata,
    result: F
) -> SingleResponse<T> where
    F: Future<Output = Result<T>> + Send + 'static, 
[src]

pub fn metadata_and_future_and_trailing_metadata<F, M>(
    metadata: Metadata,
    result: F,
    trailing: M
) -> SingleResponse<T> where
    F: Future<Output = Result<T>> + Send + 'static,
    M: Future<Output = Result<Metadata>> + Send + 'static, 
[src]

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

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

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

pub fn no_metadata<F>(r: F) -> SingleResponse<T> where
    F: Future<Output = Result<T>> + Send + 'static, 
[src]

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

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

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

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

Convert self into single element stream.

Trait Implementations

impl<T: Send + 'static> Future for SingleResponse<T>[src]

type Output = Result<(Metadata, GrpcFuture<(T, Metadata)>)>

The type of value produced on completion.

Auto Trait Implementations

impl<T> !RefUnwindSafe for SingleResponse<T>

impl<T> Send for SingleResponse<T>

impl<T> !Sync for SingleResponse<T>

impl<T> Unpin for SingleResponse<T>

impl<T> !UnwindSafe for SingleResponse<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> FutureExt for T where
    T: Future + ?Sized
[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<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

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.