Write

Trait Write 

pub trait Write {
    type Error;

    // Required method
    fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
}
Expand description

A type that writes byte slices.

Required Associated Types§

type Error

Required Methods§

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

Write the whole byte slice.

Implementations on Foreign Types§

§

impl Write for &mut [u8]

§

type Error = EndOfSlice

§

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

§

impl Write for Vec<u8>

Available on crate feature alloc only.
§

type Error = Infallible

§

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

§

impl<W> Write for &mut W
where W: Write + ?Sized,

§

type Error = <W as Write>::Error

§

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

§

impl<const BITS: usize> Write for &mut Hasher<BITS>

§

type Error = Infallible

§

fn write_all( &mut self, buf: &[u8], ) -> Result<(), <&mut Hasher<BITS> as Write>::Error>

Implementors§

§

impl Write for Cursor<&mut [u8]>

§

impl Write for Cursor<Box<[u8]>>

Available on crate feature alloc only.
§

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

Available on crate feature std only.
§

type Error = Error

§

impl<const N: usize> Write for Cursor<[u8; N]>