pub unsafe trait Buffer: AsRef<[u8]> {
// Required methods
fn from_bytes(bytes: &[u8]) -> Self;
fn from_vec(bytes: Vec<u8>) -> Self;
}Expand description
Buffer type.
§Safety
The AsRef<[u8]> implementation must return the bytes provided using
the from_bytes and from_vec constructor functions.
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.