AsCgmathCanonicalInterface

Trait AsCgmathCanonicalInterface 

Source
pub trait AsCgmathCanonicalInterface<T>: AsCgmathNonCanonicalInterface<T> + Copy
where T: Copy,
{ // Required methods fn as_cgmath(&self) -> &T; fn as_cgmath_mut(&mut self) -> &mut T; }
Expand description

Trait to interpret canonical math data structures of other math libs as their analogs in cgmath to use operations of cgmath.

Required Methods§

Source

fn as_cgmath(&self) -> &T

Interpret this data structure as cgmath analog to use its operations.

Source

fn as_cgmath_mut(&mut self) -> &mut T

Interpret this data structure mutably as cgmath analog to use its operations.

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<Scalar, Any> AsCgmathCanonicalInterface<Vector2<Scalar>> for Any
where Scalar: ScalarInterface, Any: X2CanonicalInterface<Scalar = Scalar> + Copy,