pub trait BufSplit {
// Required method
fn split_at(&mut self, at: usize) -> Self;
// Provided method
fn try_add_prefix(&mut self, _prefix: &[u8]) -> bool { ... }
}Expand description
A trait that enables zero-copy sends to quiche. When buffers produced
by the BufFactory implement this trait, quiche and h3 can supply the
raw buffers to be sent, instead of slices that must be copied first.
Source
Split the buffer at a given point, after the split the old buffer
must only contain the first at bytes, while the newly produced
buffer must containt the remaining bytes.
Source
Try to prepend a prefix to the buffer, return true if succeeded.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.