actix-derive Build Status crates.io

Actix is a rust actor framework.


Actix is licensed under the Apache-2.0 license.

Features

Usage

```rust

[macrouse] extern crate actixderive;

use std::io::Error;

[derive(Message)]

[rtype(result="Result")]

struct Sum(usize, usize);

[derive(MessageResponse)]

struct Added(usize);

fn main() {} ```

This code expands into following code:

```rust extern crate actix; use std::io::Error; use actix::dev::MessageResponse; use actix::dev::ResponseChannel; use actix::Message;

struct Sum(usize, Error);

impl Message for Sum { type Result = Result; }

struct Added(usize);

impl MessageResponse for Added where A: Actor, M: Message { fn handle>(self, _: &mut A::Context, tx: Option) { if let Some(tx) = tx { tx.send(self); } } }

fn main() {} ```

License

This project is licensed under either of

at your option.