Trait Constant

Source
pub trait Constant<T: CType>: PlatformInstance {
    type Buffer: BufferInstance<T>;

    // Required method
    fn constant(&self, value: T, size: usize) -> Result<Self::Buffer, Error>;
}
Expand description

Constructor for a new buffer filled with a single value

Required Associated Types§

Source

type Buffer: BufferInstance<T>

The type of buffer use by this platform

Required Methods§

Source

fn constant(&self, value: T, size: usize) -> Result<Self::Buffer, Error>

Construct a new buffer filled with a single value.

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§