Name: actix-protobuf
Owner: Actix
Description: Protobuf integration for actix web
Created: 2018-03-11 15:54:39.0
Updated: 2018-05-20 05:02:37.0
Pushed: 2018-04-11 06:39:29.0
Homepage: null
Size: 17
Language: Rust
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Protobuf support for actix-web framework.
actix_web::{HttpResponse, Result};
actix_protobuf::ProtoBuf;
rive(Clone, Debug, PartialEq, Message)]
struct MyObj {
#[prost(int32, tag="1")]
pub number: i32,
#[prost(string, tag="2")]
pub name: String,
ndex(msg: ProtoBuf<MyObj>) -> Result<HttpResponse> {
println!("model: {:?}", msg);
HttpResponse::Ok().protobuf(msg.0) // <- send response
This project is licensed under either of
at your option.