Struct mrsc::Channel
[−]
[src]
pub struct Channel<T, R> { /* fields omitted */ }
A channel to the server that can be used to send requests
Methods
impl<T, R> Channel<T, R>
[src]
fn req(&self, payload: T) -> Result<Response<R>, SendError<T, R>>
[src]
Sends a new request to the server.
Examples
use mrsc; let server: mrsc::Server<u32, String> = mrsc::Server::new(); let channel = server.pop(); channel.req(123).unwrap();