pub trait Splittable: Sized {
// Required method
fn split_if(&mut self, max: usize) -> Option<Self>;
}Expand description
Trait for buffer types that may be split at a maximum length.
This is enabled via the cleaver feature.
Required Methods§
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.
Implementations on Foreign Types§
Source§impl Splittable for Bytes
This implementation is inexpensive, relying on Bytes::split_to which does
not copy.
impl Splittable for Bytes
This implementation is inexpensive, relying on Bytes::split_to which does
not copy.