pub trait ByteSize {
// Required method
fn byte_size() -> Bytes;
}Expand description
A trait defining the size, in bytes, of one unit of Self.
§Example
println!("The size of one word in bytes is {}.", Words::byte_size().0);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.