pub trait BytesConvertable {
// Required methods
fn into_bytes(self) -> Vec<u8> ⓘ;
fn from_bytes(bytes: Vec<u8>) -> Self;
}
Expand description
Trait for use with ractor_cluster_derive::RactorClusterMessage
derive macro. It defines argument and reply message types which
are serializable to/from byte payloads so code can be autogenerated
for you by macros for over-the-wire message formats between actors
Required Methods§
Sourcefn into_bytes(self) -> Vec<u8> ⓘ
fn into_bytes(self) -> Vec<u8> ⓘ
Serialize this type to a vector of bytes. Panics are acceptable
Sourcefn from_bytes(bytes: Vec<u8>) -> Self
fn from_bytes(bytes: Vec<u8>) -> Self
Deserialize this type from a vector of bytes. Panics are acceptable
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.