Skip to main content

VariableWritable

Trait VariableWritable 

Source
pub trait VariableWritable {
    type Error;

    // Required method
    fn write_single(&mut self, byte: u8) -> Result<(), Self::Error>;

    // Provided methods
    fn write_more(&mut self, buf: &[u8]) -> Result<(), Self::Error> { ... }
    fn write_more_buf<B: Buf>(&mut self, buf: &mut B) -> Result<(), Self::Error> { ... }
}
Available on crate feature sync only.

Required Associated Types§

Required Methods§

Source

fn write_single(&mut self, byte: u8) -> Result<(), Self::Error>

Provided Methods§

Source

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

Source

fn write_more_buf<B: Buf>(&mut self, buf: &mut B) -> Result<(), Self::Error>

Available on crate feature bytes only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W: Write> VariableWritable for W

Available on crate feature std-comp only.