Struct tarpc::Response [−][src]
#[non_exhaustive]pub struct Response<T> {
pub request_id: u64,
pub message: Result<T, ServerError>,
}
Expand description
A response from a server to a client.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.request_id: u64
The ID of the request being responded to.
message: Result<T, ServerError>
The response body, or an error if the request failed.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Error = C::Error
type Error = C::Error
The type of value produced by the sink when an error occurs.
Attempts to prepare the Sink
to receive a value. Read more
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more
Flush any remaining output from this sink. Read more
impl<Req, Resp, T> Sink<Response<Resp>> for BaseChannel<Req, Resp, T> where
T: Transport<Response<Resp>, ClientMessage<Req>>,
T::Error: Error,
impl<Req, Resp, T> Sink<Response<Resp>> for BaseChannel<Req, Resp, T> where
T: Transport<Response<Resp>, ClientMessage<Req>>,
T::Error: Error,
type Error = ChannelError<T::Error>
type Error = ChannelError<T::Error>
The type of value produced by the sink when an error occurs.
Attempts to prepare the Sink
to receive a value. Read more
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more
Flush any remaining output from this sink. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Response<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Response<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more