Trait lightning::util::ser::Writer [−][src]
pub trait Writer { fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>; fn size_hint(&mut self, size: usize); }
Expand description
A trait that is similar to std::io::Write but has one extra function which can be used to size buffers being written into. An impl is provided for any type that also impls std::io::Write which simply ignores size hints.
(C-not exported) as we only export serialization to/from byte arrays instead
Required methods
Writes the given buf out. See std::io::Write::write_all for more