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

#1708 in Web programming

Download history 244/week @ 2024-01-28 231/week @ 2024-02-04 85/week @ 2024-02-11 174/week @ 2024-02-18 222/week @ 2024-02-25 232/week @ 2024-03-03 169/week @ 2024-03-10 154/week @ 2024-03-17 269/week @ 2024-03-24 463/week @ 2024-03-31 248/week @ 2024-04-07 209/week @ 2024-04-14 265/week @ 2024-04-21 154/week @ 2024-04-28 164/week @ 2024-05-05 142/week @ 2024-05-12

739 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

~16–27MB
~484K SLoC