Writer

Trait Writer 

Source
pub trait Writer {
Show 14 methods // Required method fn write_u8(&mut self, value: u8) -> Result<()>; // Provided methods fn write_buf(&mut self, buf: &[u8]) -> Result<()> { ... } fn write_presence_map(&mut self, bitmap: u64, size: u8) -> Result<()> { ... } fn write_uint(&mut self, value: u64) -> Result<()> { ... } fn write_uint_nullable(&mut self, value: Option<u64>) -> Result<()> { ... } fn write_int(&mut self, value: i64) -> Result<()> { ... } fn write_int_nullable(&mut self, value: Option<i64>) -> Result<()> { ... } fn write_ascii_string(&mut self, value: &str) -> Result<()> { ... } fn write_ascii_string_nullable(&mut self, value: Option<&str>) -> Result<()> { ... } fn _write_ascii_str(&mut self, value: &str) -> Result<()> { ... } fn write_unicode_string(&mut self, value: &str) -> Result<()> { ... } fn write_unicode_string_nullable( &mut self, value: Option<&str>, ) -> Result<()> { ... } fn write_bytes(&mut self, value: &[u8]) -> Result<()> { ... } fn write_bytes_nullable(&mut self, value: Option<&[u8]>) -> Result<()> { ... }
}
Expand description

A trait that provides methods for writing basic primitive types.

Required Methods§

Source

fn write_u8(&mut self, value: u8) -> Result<()>

Provided Methods§

Source

fn write_buf(&mut self, buf: &[u8]) -> Result<()>

Implement this method for more efficient writing of multiple bytes.

Source

fn write_presence_map(&mut self, bitmap: u64, size: u8) -> Result<()>

Write the presence map.

Source

fn write_uint(&mut self, value: u64) -> Result<()>

Source

fn write_uint_nullable(&mut self, value: Option<u64>) -> Result<()>

Source

fn write_int(&mut self, value: i64) -> Result<()>

Source

fn write_int_nullable(&mut self, value: Option<i64>) -> Result<()>

Source

fn write_ascii_string(&mut self, value: &str) -> Result<()>

Source

fn write_ascii_string_nullable(&mut self, value: Option<&str>) -> Result<()>

Source

fn _write_ascii_str(&mut self, value: &str) -> Result<()>

Source

fn write_unicode_string(&mut self, value: &str) -> Result<()>

Source

fn write_unicode_string_nullable(&mut self, value: Option<&str>) -> Result<()>

Source

fn write_bytes(&mut self, value: &[u8]) -> Result<()>

Source

fn write_bytes_nullable(&mut self, value: Option<&[u8]>) -> Result<()>

Implementations on Foreign Types§

Source§

impl Writer for BytesMut

Source§

fn write_u8(&mut self, value: u8) -> Result<()>

Source§

fn write_buf(&mut self, buf: &[u8]) -> Result<()>

Implementors§