Trait kafka_protocol::protocol::buf::ByteBufMut
source · pub trait ByteBufMut: BufMut {
fn offset(&self) -> usize;
fn seek(&mut self, offset: usize);
fn range(&mut self, r: Range<usize>) -> &mut [u8] ⓘ;
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.