Trait ractor_cluster::BytesConvertable
source · 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
Object Safety§
This trait is not object safe.