kafka::producer

Trait AsBytes

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

A trait used by Producer to obtain the bytes Record::key and Record::value represent. This leaves the choice of the types for key and value with the client.

Required Methods§

source

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

Implementations on Foreign Types§

source§

impl AsBytes for ()

source§

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

source§

impl AsBytes for String

source§

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

source§

impl AsBytes for Vec<u8>

source§

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

source§

impl<'a> AsBytes for &'a str

source§

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

source§

impl<'a> AsBytes for &'a [u8]

source§

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

Implementors§