16 unstable releases (7 breaking)

0.9.0 Aug 24, 2022
0.8.0 Jun 25, 2022
0.7.0 Mar 1, 2022
0.7.0-beta.4 Dec 29, 2021
0.1.0 Mar 21, 2018

#496 in HTTP server

Download history 1447/week @ 2022-11-29 1950/week @ 2022-12-06 2160/week @ 2022-12-13 1594/week @ 2022-12-20 820/week @ 2022-12-27 1395/week @ 2023-01-03 2027/week @ 2023-01-10 2711/week @ 2023-01-17 2684/week @ 2023-01-24 3277/week @ 2023-01-31 4836/week @ 2023-02-07 3069/week @ 2023-02-14 3594/week @ 2023-02-21 4345/week @ 2023-02-28 4081/week @ 2023-03-07 2953/week @ 2023-03-14

15,154 downloads per month
Used in pooly

MIT/Apache

13KB
278 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–23MB
~515K SLoC