pub trait Fragment: SplitByteSlice {
// Required methods
fn take_front(&mut self, n: usize) -> Self;
fn take_back(&mut self, n: usize) -> Self;
fn empty() -> Self;
}Expand description
A single byte slice fragment in a FragmentedByteSlice.
Required Methods§
Sourcefn take_front(&mut self, n: usize) -> Self
fn take_front(&mut self, n: usize) -> Self
Takes n bytes from the front of this fragment.
After a call to take_front(n), the fragment is n bytes shorter.
§Panics
Panics if n is larger than the length of this ByteSlice.
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.