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§

Get the current offset of the buffer.

Seek to the provided offset in the buffer.

Read a range from the buffer.

Provided Methods§

Put a gap of len at the current buffer offset.

Read a gap from the buffer.

Put a typed gap of type T at the current buffer offset.

Insert a value of the TypedGap type at the current buffer offset.

Implementations on Foreign Types§

Implementors§