pub trait BencodeWrite {
// Required methods
fn write_byte(&mut self, byte: u8);
fn write_bytes(&mut self, bytes: &[u8]);
}Expand description
Core trait defining the interface for writing bencode output (ISP & DIP compliant).
Required Methods§
Sourcefn write_byte(&mut self, byte: u8)
fn write_byte(&mut self, byte: u8)
Writes a single byte to the destination.
Sourcefn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Writes multiple bytes from a raw byte slice to the destination (binary-safe).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".