pub trait Bytes: Sized {
type Bytes;
// Required methods
fn to_bytes(self) -> Self::Bytes;
fn from_bytes(value: Self::Bytes) -> Self;
// Provided method
fn bitcast<U: Bytes<Bytes = Self::Bytes>>(self) -> U { ... }
}
Required Associated Types§
Required Methods§
Provided 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.