pub trait Writer: Sealed {
// Required method
fn write_bytes(&mut self, data: &[u8]) -> Result<(), DiagError>;
}Expand description
Abstraction over alloc and no-alloc write targets.
Implemented for:
&mut [u8]- no-alloc, fixed-size buffer, advances cursor on writebytes::BytesMut- alloc, growable buffer (feature = “alloc”)
Sealed to prevent downstream implementations.