Skip to main content

FromShape

Trait FromShape 

Source
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§

Source

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".

Implementors§