Reinterpret

Trait Reinterpret 

Source
pub trait Reinterpret: CubePrimitive {
    // Provided methods
    fn reinterpret<From>(value: From) -> Self
       where From: CubePrimitive { ... }
    fn __expand_reinterpret<From>(
        scope: &mut Scope,
        value: ExpandElementTyped<From>,
    ) -> Self::ExpandType
       where From: CubePrimitive { ... }
}
Expand description

Enables reinterpetring the bits from any value to any other type of the same size.

Provided Methods§

Source

fn reinterpret<From>(value: From) -> Self
where From: CubePrimitive,

Reinterpret the bits of another primitive as this primitive without conversion.

Source

fn __expand_reinterpret<From>( scope: &mut Scope, value: ExpandElementTyped<From>, ) -> Self::ExpandType
where 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.

Implementors§

Source§

impl<P> Reinterpret for P
where P: CubePrimitive,