spinoso_string/enc/binary/
io.rs

1use core::fmt;
2use std::io::{self, IoSlice, Write};
3
4use super::BinaryString;
5
6impl Write for BinaryString {
7    #[inline]
8    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
9        self.inner.write(buf)
10    }
11
12    #[inline]
13    fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
14        self.inner.write_all(buf)
15    }
16
17    #[inline]
18    fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
19        self.inner.write_fmt(fmt)
20    }
21
22    #[inline]
23    fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
24        self.inner.write_vectored(bufs)
25    }
26
27    #[inline]
28    fn flush(&mut self) -> io::Result<()> {
29        self.inner.flush()
30    }
31}