pub struct ClientStreamCallTyped<Req, Resp> { /* private fields */ }Expand description
Typed caller-side handle for a client-streaming call. Encodes
each send(&Req) via the captured Codec; decodes the
terminal RESPONSE body into Resp on finish.
Bidi streaming plan (Phase E).
Implementations§
Source§impl<Req: Serialize, Resp: DeserializeOwned> ClientStreamCallTyped<Req, Resp>
impl<Req: Serialize, Resp: DeserializeOwned> ClientStreamCallTyped<Req, Resp>
Sourcepub async fn send(&mut self, value: &Req) -> Result<(), RpcError>
pub async fn send(&mut self, value: &Req) -> Result<(), RpcError>
Encode value via the captured codec and publish it as
the next REQUEST / REQUEST_CHUNK frame.
Sourcepub async fn finish(self) -> Result<Resp, RpcError>
pub async fn finish(self) -> Result<Resp, RpcError>
Close the upload and await the typed terminal response.
Sourcepub fn flow_controlled(&self) -> bool
pub fn flow_controlled(&self) -> bool
Whether the upload side is flow-controlled.
Auto Trait Implementations§
impl<Req, Resp> !Freeze for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> !RefUnwindSafe for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> !UnwindSafe for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> Send for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> Sync for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> Unpin for ClientStreamCallTyped<Req, Resp>
impl<Req, Resp> UnsafeUnpin for ClientStreamCallTyped<Req, Resp>
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