Struct mrsc::Response [] [src]

pub struct Response<R> { /* fields omitted */ }

The response returned to an request

Methods

impl<R> Response<R>
[src]

[src]

Receives the response from the server. Blocks until the request has been answered. Since there is only one response to each request this consumes the Response. This operation is blocking.

Examples

use mrsc;

let server: mrsc::Server<u32, String> = mrsc::Server::new();

let channel = server.pop();
// send request
let response = channel.req(123).unwrap();

// answer request
server.recv().unwrap().reply("hello world".to_string()).unwrap();

// receive result
response.recv().unwrap();

[src]

[src]

Trait Implementations

impl<R: Debug> Debug for Response<R>
[src]

[src]

Formats the value using the given formatter.