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§

source

fn into_bytes(self) -> Vec<u8>

Serialize this type to a vector of bytes. Panics are acceptable

source

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.

Implementations on Foreign Types§

source§

impl BytesConvertable for bool

source§

impl BytesConvertable for char

source§

impl BytesConvertable for f32

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> f32

source§

impl BytesConvertable for f64

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> f64

source§

impl BytesConvertable for i8

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> i8

source§

impl BytesConvertable for i16

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> i16

source§

impl BytesConvertable for i32

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> i32

source§

impl BytesConvertable for i64

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> i64

source§

impl BytesConvertable for i128

source§

impl BytesConvertable for u8

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> u8

source§

impl BytesConvertable for u16

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> u16

source§

impl BytesConvertable for u32

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> u32

source§

impl BytesConvertable for u64

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> u64

source§

impl BytesConvertable for u128

source§

impl BytesConvertable for ()

source§

impl BytesConvertable for String

source§

impl BytesConvertable for Vec<bool>

source§

impl BytesConvertable for Vec<char>

source§

impl BytesConvertable for Vec<f32>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<f32>

source§

impl BytesConvertable for Vec<f64>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<f64>

source§

impl BytesConvertable for Vec<i8>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<i8>

source§

impl BytesConvertable for Vec<i16>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<i16>

source§

impl BytesConvertable for Vec<i32>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<i32>

source§

impl BytesConvertable for Vec<i64>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<i64>

source§

impl BytesConvertable for Vec<i128>

source§

impl BytesConvertable for Vec<u8>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<u8>

source§

impl BytesConvertable for Vec<u16>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<u16>

source§

impl BytesConvertable for Vec<u32>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<u32>

source§

impl BytesConvertable for Vec<u64>

source§

fn into_bytes(self) -> Vec<u8>

source§

fn from_bytes(bytes: Vec<u8>) -> Vec<u64>

source§

impl BytesConvertable for Vec<u128>

Implementors§