Struct mrsc::EmptyRequest
[−]
[src]
pub struct EmptyRequest<R> { /* fields omitted */ }
A request without payload
Methods
impl<R> EmptyRequest<R>
[src]
fn reply(self, response: R) -> Result<(), SendError<R>>
[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(); let (req, payload) = req.take(); req.reply("hello world".to_string()).unwrap();