pub trait Payload: Sized {
// Required methods
fn name() -> &'static str;
fn parse(data: BinaryData) -> Result<Self, ()>;
fn to_val(self) -> BinaryData;
}
Expand description
Any type that can be sent directly over network tables
Required Methods§
fn name() -> &'static str
fn parse(data: BinaryData) -> Result<Self, ()>
fn to_val(self) -> BinaryData
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.