Trait WriteExt

Source
pub trait WriteExt: Write {
    // Required methods
    fn write_cstring<S: AsRef<[u8]>>(&mut self, s: S) -> Result<()>;
    fn write_compressed_int(&mut self, x: u32) -> Result<usize>;
}

Required Methods§

Source

fn write_cstring<S: AsRef<[u8]>>(&mut self, s: S) -> Result<()>

Writes a null-terminated string to the output.

§Errors

If the output fails to write.

Source

fn write_compressed_int(&mut self, x: u32) -> Result<usize>

Writes a compressed u32 to the output.

§Errors

If the output fails to write.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Write> WriteExt for T