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<'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,

§

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

§

fn flush(&mut self) -> 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,