pub trait ByteBufMut: BufMut {
// Required methods
fn offset(&self) -> usize;
fn seek(&mut self, offset: usize);
fn range(&mut self, r: Range<usize>) -> &mut [u8] ⓘ;
// Provided methods
fn put_gap(&mut self, len: usize) -> Gap { ... }
fn gap_buf(&mut self, gap: Gap) -> &mut [u8] ⓘ { ... }
fn put_typed_gap<T: GapType>(&mut self, type_: T) -> TypedGap<T> { ... }
fn fill_typed_gap<T: GapType>(&mut self, gap: TypedGap<T>, value: T::Value) { ... }
}
Expand description
Extension for working with bytes::buf::BufMut
.
Required Methods§
Provided Methods§
Sourcefn put_typed_gap<T: GapType>(&mut self, type_: T) -> TypedGap<T>
fn put_typed_gap<T: GapType>(&mut self, type_: T) -> TypedGap<T>
Put a typed gap of type T
at the current buffer offset.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.