pub trait CubeType {
type ExpandType: Clone + IntoMut + CubeDebug;
}Expand description
Types used in a cube function must implement this trait
Variables whose values will be known at runtime must
have ManagedVariable as associated type
Variables whose values will be known at compile time
must have the primitive type as associated type
Note: Cube functions should be written using CubeTypes,
so that the code generated uses the associated ExpandType.
This allows Cube code to not necessitate cloning, which is cumbersome
in algorithmic code. The necessary cloning will automatically appear in
the generated code.
Required Associated Types§
type ExpandType: Clone + IntoMut + CubeDebug
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".