pub trait PacketBuffer:
BitRead
+ Seek
+ Debug
+ LowerHex {
// Required methods
fn position(&self) -> u64;
fn bytes_remaining(&self) -> usize;
fn sub_buffer(&self, range: Range<usize>) -> impl PacketBuffer;
}Required Methods§
Sourcefn bytes_remaining(&self) -> usize
fn bytes_remaining(&self) -> usize
How many bytes remaining in this buffer.
Sourcefn sub_buffer(&self, range: Range<usize>) -> impl PacketBuffer
fn sub_buffer(&self, range: Range<usize>) -> impl PacketBuffer
Get a sub buffer of this one, corresponding to the given range. Note that advances in the given sub-buffer’s position wll not be reflected in the parent; you’ll need to seek manually.
§Example:
TODO
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.