actix/actix-protobuf
Fork: 32 Star: 81 (更新于 2024-11-02 07:40:47)
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-11-22 05:42:56 lanyeeee/jmcomic-downloader
2024-11-19 23:39:15 gleam-lang/gleam
2024-11-19 08:50:55 lapce/lapce
2024-11-11 22:51:00 tauri-apps/tauri
2024-11-11 07:55:30 dani-garcia/vaultwarden
2024-11-09 16:42:37 rustdesk/rustdesk