[][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<Item = (Metadata, GrpcFuture<(T, Metadata)>), Error = Error> + Send + 'static, 
[src]

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

pub fn metadata_and_future_and_trailing_metadata<F, M>(
    metadata: Metadata,
    result: F,
    trailing: M
) -> SingleResponse<T> where
    F: Future<Item = T, Error = Error> + Send + 'static,
    M: Future<Item = Metadata, Error = Error> + 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<Item = T, Error = Error> + 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.

pub fn wait(self) -> Result<(Metadata, T, Metadata)>[src]

pub fn wait_drop_metadata(self) -> Result<T>[src]

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, 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.