pub struct Encoder { /* private fields */ }Implementations§
Source§impl Encoder
impl Encoder
pub fn new() -> Self
pub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn write_i8(&mut self, value: i8)
pub fn write_bool(&mut self, value: bool)
pub fn write_i16(&mut self, value: i16)
pub fn write_i32(&mut self, value: i32)
pub fn write_i64(&mut self, value: i64)
Sourcepub fn write_uuid(&mut self, value: &[u8; 16])
pub fn write_uuid(&mut self, value: &[u8; 16])
Writes a Kafka UUID as its 16-byte network-order representation.
pub fn write_f64(&mut self, value: f64)
pub fn write_string(&mut self, value: &str) -> Result<()>
pub fn write_nullable_string(&mut self, value: Option<&str>) -> Result<()>
pub fn write_bytes(&mut self, value: &[u8]) -> Result<()>
pub fn write_nullable_bytes(&mut self, value: Option<&[u8]>) -> Result<()>
pub fn write_unsigned_varint(&mut self, value: u32)
pub fn write_varint(&mut self, value: i32)
pub fn write_varlong(&mut self, value: i64)
pub fn write_varint_bytes(&mut self, value: &[u8]) -> Result<()>
pub fn write_varint_nullable_bytes( &mut self, value: Option<&[u8]>, ) -> Result<()>
pub fn write_compact_string(&mut self, value: &str) -> Result<()>
pub fn write_compact_nullable_string( &mut self, value: Option<&str>, ) -> Result<()>
pub fn write_compact_bytes(&mut self, value: &[u8]) -> Result<()>
pub fn write_compact_nullable_bytes( &mut self, value: Option<&[u8]>, ) -> Result<()>
pub fn write_array<T>( &mut self, values: Option<&[T]>, write_item: impl FnMut(&mut Self, &T) -> Result<()>, ) -> Result<()>
pub fn write_compact_array<T>( &mut self, values: Option<&[T]>, write_item: impl FnMut(&mut Self, &T) -> Result<()>, ) -> Result<()>
pub fn write_empty_tagged_fields(&mut self)
pub fn write_raw(&mut self, bytes: &[u8])
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more