strafe-client-jed/fixed_wide_vectors/src/macros/vector.rs

26 lines
577 B
Rust
Raw Normal View History

2024-09-05 20:36:38 +00:00
#[doc(hidden)]
#[macro_export(local_inner_macros)]
macro_rules! impl_vector {
() => {
//$crate::impl_common!();
}
}
2024-08-30 19:05:52 +00:00
2024-09-05 20:36:38 +00:00
#[doc(hidden)]
#[macro_export(local_inner_macros)]
macro_rules! impl_vector_named_fields {
( $struct:ident, $size: expr ) => {
impl<T> core::ops::Deref for Vector<$size,T>{
type Target=$struct<T>;
fn deref(&self)->&Self::Target{
unsafe{core::mem::transmute(&self.array)}
}
}
impl<T> core::ops::DerefMut for Vector<$size,T>{
fn deref_mut(&mut self)->&mut Self::Target{
unsafe{core::mem::transmute(&mut self.array)}
}
}
}
}