pub trait KnownSize {
// 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 Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".