Write

Trait Write 

Source
pub trait Write {
    // Required method
    fn write_all(&mut self, buf: &[u8]) -> Result<()>;
}
Expand description

Trait used by the ser::Serializer to write bytes.

Required Methods§

Source

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

Writes all of the bytes.

§Errors

If the bytes could not be written, a Bencode error is returned.

Implementations on Foreign Types§

Source§

impl Write for &mut Vec<u8>

Source§

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

Source§

impl Write for Vec<u8>

Source§

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

Implementors§

Source§

impl<W> Write for IoWrite<W>
where W: Write,

Available on crate feature std only.