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<T: Write> Write for &mut T

source§

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

source§

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

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.