Trait rdkafka::message::ToBytes

source ·
pub trait ToBytes {
    // Required method
    fn to_bytes(&self) -> &[u8] ;
}
Expand description

A cheap conversion from typed data to a byte slice.

Given some data, returns the byte representation of that data. No copy of the data should be performed.

See also the FromBytes trait.

Required Methods§

source

fn to_bytes(&self) -> &[u8]

Converts the provided data to bytes.

Implementations on Foreign Types§

source§

impl ToBytes for str

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for ()

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for String

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for Vec<u8>

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 0]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 1]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 2]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 3]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 4]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 5]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 6]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 7]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 8]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 9]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 10]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 11]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 12]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 13]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 14]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 15]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 16]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 17]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 18]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 19]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 20]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 21]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 22]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 23]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 24]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 25]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 26]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 27]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 28]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 29]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 30]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 31]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8; 32]

source§

fn to_bytes(&self) -> &[u8]

source§

impl ToBytes for [u8]

source§

fn to_bytes(&self) -> &[u8]

source§

impl<'a, T: ToBytes> ToBytes for &'a T

source§

fn to_bytes(&self) -> &[u8]

Implementors§