Skip to main content

ViewClientStreamingHandler

Trait ViewClientStreamingHandler 

Source
pub trait ViewClientStreamingHandler<ReqView>:
    Send
    + Sync
    + 'static
where ReqView: MessageView<'static> + Send + Sync + 'static,
{ // Required method fn call( &self, ctx: RequestContext, requests: ServiceStream<OwnedView<ReqView>>, format: CodecFormat, ) -> BoxFuture<'static, Result<EncodedResponse, ConnectError>>; }
Expand description

Trait for client streaming RPC handlers using zero-copy request views.

call returns the response already encoded; see ViewHandler.

Required Methods§

Source

fn call( &self, ctx: RequestContext, requests: ServiceStream<OwnedView<ReqView>>, format: CodecFormat, ) -> BoxFuture<'static, Result<EncodedResponse, ConnectError>>

Handle a client streaming RPC request with zero-copy view items, encoding the response in format.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F, Fut, ReqView> ViewClientStreamingHandler<ReqView> for FnViewClientStreamingHandler<F>
where F: Fn(RequestContext, ServiceStream<OwnedView<ReqView>>, CodecFormat) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<EncodedResponse, ConnectError>> + Send + 'static, ReqView: MessageView<'static> + Send + Sync + 'static,