17 unstable releases

0.10.0 Sep 16, 2023
0.9.0 Aug 24, 2022
0.8.0 Jun 25, 2022
0.7.0 Mar 1, 2022
0.1.0 Mar 21, 2018

#1733 in Web programming

Download history 2524/week @ 2024-01-06 1934/week @ 2024-01-13 2371/week @ 2024-01-20 319/week @ 2024-01-27 243/week @ 2024-02-03 93/week @ 2024-02-10 171/week @ 2024-02-17 207/week @ 2024-02-24 230/week @ 2024-03-02 186/week @ 2024-03-09 151/week @ 2024-03-16 246/week @ 2024-03-23 470/week @ 2024-03-30 257/week @ 2024-04-06 217/week @ 2024-04-13 255/week @ 2024-04-20

1,230 downloads per month
Used in pooly

MIT/Apache

14KB
277 lines

actix-protobuf

Protobuf payload extractor for Actix Web.

crates.io Documentation Apache 2.0 or MIT licensed Dependency Status

Documentation & Resources

Example

use actix_protobuf::*;
use actix_web::*;

#[derive(Clone, PartialEq, Message)]
pub struct MyObj {
    #[prost(int32, tag = "1")]
    pub number: i32,

    #[prost(string, tag = "2")]
    pub name: String,
}

async fn index(msg: ProtoBuf<MyObj>) -> Result<HttpResponse> {
    println!("model: {:?}", msg);
    HttpResponse::Ok().protobuf(msg.0) // <- send response
}

See here for the complete example.

License

This project is licensed under either of

at your option.

Dependencies

~17–30MB
~538K SLoC