Trait WriteRef

Source
pub trait WriteRef {
    // Required method
    fn write_ref_bytes_with_callback<F, W: Write>(
        &self,
        writer: &mut W,
        callback: F,
    ) -> Result<()>
       where F: Fn(&[u8]);

    // Provided method
    fn write_ref_bytes<W: Write>(&self, writer: &mut W) -> Result<()> { ... }
}

Required Methods§

Source

fn write_ref_bytes_with_callback<F, W: Write>( &self, writer: &mut W, callback: F, ) -> Result<()>
where F: Fn(&[u8]),

Provided Methods§

Source

fn write_ref_bytes<W: Write>(&self, writer: &mut W) -> Result<()>

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.

Implementations on Foreign Types§

Source§

impl WriteRef for str

Source§

fn write_ref_bytes_with_callback<F, W: Write>( &self, writer: &mut W, callback: F, ) -> Result<()>
where F: Fn(&[u8]),

Source§

impl WriteRef for [u8]

Source§

fn write_ref_bytes_with_callback<F, W: Write>( &self, writer: &mut W, callback: F, ) -> Result<()>
where F: Fn(&[u8]),

Implementors§