pub trait Msg:
Sized
+ Clone
+ TryFrom<Self::Proto, Error = Report>
+ Into<Self::Proto> {
type Proto: Default + MessageExt + Name;
// Provided methods
fn from_any(any: &Any) -> Result<Self, Report> { ... }
fn to_any(&self) -> Result<Any, Report> { ... }
fn into_any(self) -> Result<Any, Report> { ... }
}Expand description
Message types.
Types which impl this trait map one-to-one with a corresponding Protocol Buffers type, but can assert additional invariants and/or additional functionality beyond the raw proto, as well as providing a more idiomatic Rust type to work with.
Required Associated Types§
Sourcetype Proto: Default + MessageExt + Name
type Proto: Default + MessageExt + Name
Protocol Buffers type
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".