actix/actix-protobuf

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Actix-web ProtoBuf Build Status codecov crates.io Join the chat at https://gitter.im/actix/actix

Protobuf support for actix-web framework.

Example
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

License

This project is licensed under either of

at your option.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.