pub trait SetLen { // Required method unsafe fn set_len(&mut self, len: usize); }
std
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 caller must ensure that the first len bytes of the buffer’s backing storage are initialized and that len is at most the buffer’s total capacity.
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".