pub trait CubeComptime:
Debug
+ Hash
+ Eq
+ Clone
+ Copy { }
Expand description
A type that can be used as a kernel comptime argument.
Note that a type doesn’t need to implement CubeComptime
to be used as
a comptime argument. However, this facilitate the declaration of generic cube types.
§Example
ⓘ
#[derive(CubeType)]
pub struct Example<A: CubeType, B: CubeComptime> {
a: A,
#[cube(comptime)]
b: B
}
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.