pub trait AsBytesRef {
// Required method
fn as_bytes_ref(&self) -> &[u8] ⓘ;
}Expand description
Simple trait to transform various types to &[u8]
Required Methods§
Sourcefn as_bytes_ref(&self) -> &[u8] ⓘ
fn as_bytes_ref(&self) -> &[u8] ⓘ
Transform self into &[u8].
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".