Trait bincode_core::CoreWrite [−][src]
A target that can be written to. This is similar to std::io::Write
, but the std trait is not
available in #![no_std]
projects.
This trait is auto-implemented for [BufferWriter], but can also be implemented to write to an e.g.
embedded_hal::serial::Write
.
Associated Types
Loading content...Required methods
fn write(&mut self, val: u8) -> Result<(), Self::Error>
[src]
Write a single byte to the writer. This is assumed to be blocking, if the underlying writer is non-blocking, the value should be written to a backing buffer instead.
Provided methods
fn flush(&mut self) -> Result<(), Self::Error>
[src]
Flush the writer. This should empty any backing buffer and ensure all data is transferred. This function should block until all data is flushed.
fn write_all(&mut self, val: &[u8]) -> Result<(), Self::Error>
[src]
Helper function to write multiple bytes to a writer. The default implementation calls write with each byte in the slice.