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§
Sourcetype Buffer: BufferInstance<T>
type Buffer: BufferInstance<T>
The type of buffer use by this platform
Required Methods§
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.