pub struct BatchResults { /* private fields */ }Expand description
Per-handle results from a sent batch. Each handle can be taken
exactly once.
Implementations§
Source§impl BatchResults
impl BatchResults
Sourcepub fn take<O>(&mut self, handle: BatchHandle<O>) -> Result<O, RpcClientError>where
O: DeserializeOwned,
pub fn take<O>(&mut self, handle: BatchHandle<O>) -> Result<O, RpcClientError>where
O: DeserializeOwned,
Extract the typed output for one queued op. Returns:
Ok(output)— the server emitted anoutputfor this frame and it decoded intoO.Err(RpcClientError::Codec(_))— the input failed to encode before send, or the output failed to decode.Err(RpcClientError::Remote(RpcRemoteError { body, .. }))— the server emitted anerrorframe for this op. Thestatusfield is derived from the gRPC-style code in the body since/rpc/batchreturns 200 at the HTTP level regardless of per-frame outcomes.Err(RpcClientError::InvalidResponse(_))— the server omitted this frame entirely or the frame had neitheroutputnorerrorset.
Auto Trait Implementations§
impl Freeze for BatchResults
impl RefUnwindSafe for BatchResults
impl Send for BatchResults
impl Sync for BatchResults
impl Unpin for BatchResults
impl UnsafeUnpin for BatchResults
impl UnwindSafe for BatchResults
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more