Struct copra::channel::Channel
[−]
[src]
pub struct Channel { /* fields omitted */ }
Communication channel between servers
The Channel
implements Clone
, Send
, and Sync
. Once a channel is create from
a ChannelBuilder
, it can be cloned and used in multiple threads.
Methods
impl Channel
[src]
fn new(
sender: UnboundedSender<(Sender<Result<((RpcResponseMeta, Bytes), FeedbackHandle)>>, (RpcRequestMeta, Bytes))>,
max_concurrency: u32
) -> Self
[src]
sender: UnboundedSender<(Sender<Result<((RpcResponseMeta, Bytes), FeedbackHandle)>>, (RpcRequestMeta, Bytes))>,
max_concurrency: u32
) -> Self
Create a new channel.
This method is used by ChannelBuilder
.
fn call(&self, req: (RpcRequestMeta, Bytes)) -> ChannelFuture
[src]
Issue a request.
This method deals with serialized, untyped message. It is meaned to be used internally by the framework. More ergonomic interfaces are provided by the auto-generated stubs.
fn congested(&self) -> bool
[src]
Check if the channel is currently congested (i.e. concurrency limit is reached).
Trait Implementations
impl Clone for Channel
[src]
fn clone(&self) -> Channel
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more