pub trait WriteSlot {
// Required methods
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ;
fn commit(self);
}Expand description
A writable slot in the transport’s output buffer.
Obtained from LinkTxPermit::alloc. The caller writes encoded bytes into
as_mut_slice, then calls
commit to make them visible to the receiver.
Dropping without commit = discard (no bytes sent, space reclaimed).
Required Methods§
Sourcefn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
The writable buffer, exactly the size requested in alloc.