pub trait Cast: CubePrimitive {
// Required method
fn cast_from<From>(value: From) -> Self
where From: CubePrimitive;
// Provided method
fn __expand_cast_from<From>(
scope: &mut Scope,
value: ExpandElementTyped<From>,
) -> Self::ExpandType
where From: CubePrimitive { ... }
}Expand description
Enable elegant casting from any to any CubeElem
Required Methods§
fn cast_from<From>(value: From) -> Selfwhere
From: CubePrimitive,
Provided Methods§
fn __expand_cast_from<From>(
scope: &mut Scope,
value: ExpandElementTyped<From>,
) -> Self::ExpandTypewhere
From: CubePrimitive,
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.