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

#1615 in Web programming

Download history 2739/week @ 2023-12-11 2589/week @ 2023-12-18 524/week @ 2023-12-25 1661/week @ 2024-01-01 2633/week @ 2024-01-08 1957/week @ 2024-01-15 2145/week @ 2024-01-22 307/week @ 2024-01-29 166/week @ 2024-02-05 78/week @ 2024-02-12 174/week @ 2024-02-19 239/week @ 2024-02-26 226/week @ 2024-03-04 173/week @ 2024-03-11 143/week @ 2024-03-18 344/week @ 2024-03-25

908 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–31MB
~542K SLoC