actix/actix-protobuf
Fork: 32 Star: 81 (更新于 2024-12-22 06:45:20)
license: 暂无
Language: Rust .
Protobuf integration for actix web
最后发布版本: v0.4.1 ( 2019-10-03 18:19:41)
Actix-web ProtoBuf
Protobuf support for actix-web framework.
NOTICE: This repository has been archived. Please visit https://github.com/actix/actix-extras instead.
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
最近版本更新:(数据更新于 2024-10-02 19:25:21)
2019-10-03 18:19:41 v0.4.1
2019-05-19 23:38:29 v0.4.0
2018-04-11 03:43:25 v0.2.0
2018-03-22 06:59:04 v0.1.0
主题(topics):
actix, protobuf, rust, rust-library
actix/actix-protobuf同语言 Rust最近更新仓库
2024-12-22 10:23:54 rustdesk/rustdesk
2024-12-22 08:48:41 lapce/lapce
2024-12-21 23:25:36 tw93/Pake
2024-12-19 19:31:32 dashpay/platform
2024-12-18 10:31:25 DioxusLabs/dioxus
2024-12-17 17:18:34 lanyeeee/jmcomic-downloader