bitcoin_io

Trait Write

Source
pub trait Write {
    // Required methods
    fn write(&mut self, buf: &[u8]) -> Result<usize>;
    fn flush(&mut self) -> Result<()>;

    // Provided method
    fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
}
Expand description

A generic trait describing an output stream. See std::io::Write for more info.

Required Methods§

Source

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

Writes buf into this writer, returning how many bytes were written.

Source

fn flush(&mut self) -> Result<()>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination.

Provided Methods§

Source

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

Attempts to write an entire buffer into this writer.

Implementations on Foreign Types§

Source§

impl Write for &File

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for &Stderr

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for &Stdout

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for &Empty

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for &TcpStream

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for &ChildStdin

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for VecDeque<u8>

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Arc<File>

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Vec<u8>

Available on crate feature alloc only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

impl Write for File

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Cursor<&mut Vec<u8>>

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

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

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Cursor<Vec<u8>>

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Stderr

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Stdout

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for Empty

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for TcpStream

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl Write for ChildStdin

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

impl<'a> Write for &'a mut [u8]

Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Source§

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

Available on crate feature std only.
Source§

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

Source§

fn flush(&mut self) -> Result<()>

Source§

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

Implementors§

Source§

impl Write for Sink

Source§

impl<T: Write> Write for FromStd<T>

Available on crate feature std only.
Source§

impl<T: Write> Write for ToStd<T>

Available on crate feature std only.