[−][src]Struct grpc::SingleResponse
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]
F: Future<Item = (Metadata, GrpcFuture<(T, Metadata)>), Error = Error> + Send + 'static,
pub fn metadata_and_future<F>(
metadata: Metadata,
result: F
) -> SingleResponse<T> where
F: Future<Item = T, Error = Error> + Send + 'static,
[src]
metadata: Metadata,
result: F
) -> SingleResponse<T> where
F: Future<Item = T, Error = Error> + Send + 'static,
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]
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,
pub fn completed_with_metadata_and_trailing_metadata(
metadata: Metadata,
r: T,
trailing: Metadata
) -> SingleResponse<T>
[src]
metadata: Metadata,
r: T,
trailing: Metadata
) -> SingleResponse<T>
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]
F: Future<Item = T, Error = Error> + Send + 'static,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,