pub( crate ) mod private
{
#[ allow( unused_imports ) ]
use crate::prelude::*;
pub trait AsCgmathNonCanonicalInterface< T >
where
T : Copy,
Self : Copy
{
fn clone_as_cgmath( &self ) -> T;
}
#[ cfg( cgmath_ops ) ]
impl< T, Any > AsForeignNonCanonicalInterface< T > for Any
where
T : Copy,
Any : AsCgmathNonCanonicalInterface< T > + Copy,
{
fn clone_as_foreign( &self ) -> T
{
self.clone_as_cgmath()
}
}
pub trait AsCgmathCanonicalInterface< T >
where
T : Copy,
Self : AsCgmathNonCanonicalInterface< T > + Copy,
{
fn as_cgmath( &self ) -> &T;
fn as_cgmath_mut( &mut self ) -> &mut T;
}
#[ cfg( cgmath_ops ) ]
impl< T, Any > AsForeignCanonicalInterface< T > for Any
where
T : Copy,
Any : AsCgmathCanonicalInterface< T > + Copy,
{
fn as_foreign( &self ) -> &T
{
self.as_cgmath()
}
fn as_foreign_mut( &mut self ) -> &mut T
{
self.as_cgmath_mut()
}
}
}
crate::mod_interface!
{
prelude use
{
AsCgmathNonCanonicalInterface,
AsCgmathCanonicalInterface,
};
}