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§
Provided Methods§
Sourcefn write_buf(&mut self, buf: &[u8]) -> Result<()>
fn write_buf(&mut self, buf: &[u8]) -> Result<()>
Implement this method for more efficient writing of multiple bytes.