3 releases

0.1.2 Mar 21, 2022
0.1.1 Jan 6, 2021
0.1.0 Dec 22, 2020

#10 in #reply


Used in async-reply

MIT/Apache

8KB
107 lines

Documentation

async-reply-derive

Derive macros for async-reply message.

Usage

use async_reply::Message;

#[derive(Message)]
#[rtype(response = "Pong")]
struct Ping;

struct Pong;

fn main() {}

This code expands into following code:

use async_reply::Message;

struct Ping;

struct Pong;

impl Message for Ping {
    type Response = Pong;
}

fn main() {}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Derive macros for async-reply message.

Usage

use async_reply::Message;

#[derive(Message)]
#[rtype(response = "Pong")]
struct Ping;

struct Pong;

fn main() {}

This code expands into following code:

use async_reply::Message;

struct Ping;

struct Pong;

impl Message for Ping {
    type Response = Pong;
}

fn main() {}

Dependencies

~1.5MB
~33K SLoC