Struct mrsc::Request [] [src]

pub struct Request<T, R> { /* fields omitted */ }

The request as seen by the server thread

Methods

impl<T, R> Request<T, R>
[src]

[src]

Returns a reference to the request payload.

[src]

Returns the payload and an EmptyRequest, consumes the Request.

[src]

Reply to the request with a response. This consumes the request.

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
let req = server.recv().unwrap();
req.reply("hello world".to_string()).unwrap();

Trait Implementations

impl<T: Debug, R: Debug> Debug for Request<T, R>
[src]

[src]

Formats the value using the given formatter.