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.
Required Methods§
Provided Methods§
Sourcefn try_add_prefix(&mut self, _prefix: &[u8]) -> bool
fn try_add_prefix(&mut self, _prefix: &[u8]) -> bool
Try to prepend a prefix to the buffer, return true if succeeded.
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.