pub trait SetLen { // Required method unsafe fn set_len(&mut self, len: usize); }
Declare how many leading bytes of a buffer are initialized.
Split out of IoBufMut (mirroring compio’s SetLen) so views like Slice and Uninit can forward length-setting without re-implementing the whole mutable-buffer surface.
IoBufMut
SetLen
Slice
Uninit
Set the initialized length to len.
len
The first len bytes must actually be initialized and len must be <= the buffer’s total capacity.
<=
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".