pub trait FromShape: Layout {
// Required method
fn from_shape(shape: Self::Shape<'_>) -> Self;
}Expand description
Trait for creating a layout from a shape.
Required Methods§
Sourcefn from_shape(shape: Self::Shape<'_>) -> Self
fn from_shape(shape: Self::Shape<'_>) -> Self
Create a new contiguous layout with a given shape.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".