MakeBufferFromLayout

Trait MakeBufferFromLayout 

Source
pub trait MakeBufferFromLayout<'a>: BorrowedBuffer<'a> + Sized {
    // Required method
    fn new_from_layout(point_layout: PointLayout) -> Self;
}
Expand description

Trait for all buffers that can be default-constructed from a given PointLayout. This trait is helpful for generic code that needs to construct an generic buffer type

Required Methods§

Source

fn new_from_layout(point_layout: PointLayout) -> Self

Creates a new empty buffer from the given PointLayout

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.

Implementors§