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