pub trait KnownSize {
const MIN_SIZE: usize;
const MIN_ALIGN: Alignment;
// Required method
fn size(p: *const Self) -> usize;
}Expand description
Trait to represent compile-time known size information.
This is a generalization of size_of that works for dynamically sized types.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".