Trait bitcoin::consensus::serde::EncodeBytes
source · pub trait EncodeBytes {
// Required methods
fn encode_chunk<W: Write>(&mut self, writer: &mut W, bytes: &[u8]) -> Result;
fn flush<W: Write>(&mut self, writer: &mut W) -> Result;
}
Available on crate feature
serde
only.Expand description
Transforms given bytes and writes to the writer.
The encoder is allowed to be buffered (and probably should be). The design passing writer each time bypasses the need for GAT.
Required Methods§
Object Safety§
This trait is not object safe.