Trait bdk_chain::bitcoin::io::Write

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

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

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

Required Methods§

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

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

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

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

Provided Methods§

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

Attempts to write an entire buffer into this writer.

Implementations on Foreign Types§

§

impl Write for &File

§

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

§

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

§

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

§

impl Write for &Stderr

§

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

§

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

§

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

§

impl Write for &Stdout

§

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

§

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

§

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

§

impl Write for &Empty

§

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

§

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

§

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

§

impl Write for &TcpStream

§

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

§

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

§

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

§

impl Write for &UnixStream

§

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

§

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

§

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

§

impl Write for &ChildStdin

§

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

§

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

§

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

§

impl Write for VecDeque<u8>

§

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

§

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

§

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

§

impl Write for Arc<File>

§

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

§

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

§

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

§

impl Write for File

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl Write for Cursor<Vec<u8>>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl Write for Stderr

§

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

§

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

§

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

§

impl Write for Stdout

§

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

§

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

§

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

§

impl Write for Empty

§

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

§

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

§

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

§

impl Write for TcpStream

§

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

§

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

§

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

§

impl Write for UnixStream

§

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

§

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

§

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

§

impl Write for ChildStdin

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Implementors§

§

impl Write for Vec<u8>

§

impl Write for bdk_chain::bitcoin::hashes::ripemd160::HashEngine

§

impl Write for bdk_chain::bitcoin::hashes::sha1::HashEngine

§

impl Write for bdk_chain::bitcoin::hashes::sha256::HashEngine

§

impl Write for bdk_chain::bitcoin::hashes::sha512::HashEngine

§

impl Write for bdk_chain::bitcoin::hashes::siphash24::HashEngine

§

impl Write for Sink

§

impl<T> Write for HmacEngine<T>
where T: Hash,

§

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

§

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