-
Notifications
You must be signed in to change notification settings - Fork 588
Open
Labels
Description
Hi, I wonder, would be possible to allow prost-types to be wrapped inside std::sync::Arc? The reason is that I want my messages to be sendable across both processes and threads. When sent across processes, my messages should be serialized/deserialized with prost. When sent across threads, I would like to use reference counting.
#[derive(prost::Message)]
struct MyMessage {
#[prost(string, tag = "1")]
label: Arc<String>,
#[prost(message, tag = "2")]
payload: Arc<Payload>,
}
#[derive(prost::Message)]
struct Payload {
#[prost(i32, repeated, tag = "1")]
stuff: Vec<i32>,
}Thanks for the great crate.
isubasinghe, wchargin, bjchambers, Jason5Lee, nesscx and 17 moreevaporei, and-rewsmith, frederikhors, PSeitz and cxw620