Skip to main content

Write

Trait Write 

Source
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§

Required Methods§

Source

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

Write the whole byte slice.

Implementations on Foreign Types§

Source§

impl Write for &mut [u8]

Source§

type Error = EndOfSlice

Source§

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

Source§

impl Write for Vec<u8>

Available on crate feature alloc only.
Source§

type Error = Infallible

Source§

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

Source§

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

Source§

type Error = <W as Write>::Error

Source§

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

Implementors§

Source§

impl Write for Cursor<&mut [u8]>

Source§

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

Available on crate feature alloc only.
Source§

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

Available on crate feature std only.
Source§

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

Source§

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