bevy/crates/bevy_glam/src/f32/glam_zerocopy.rs
Carter Anderson c5ca59dc4d cargo fmt
2020-05-05 18:44:32 -07:00

115 lines
1.9 KiB
Rust

use crate::{Mat2, Mat3, Mat4, Quat, Vec2, Vec3, Vec4};
use zerocopy::{AsBytes, FromBytes};
unsafe impl AsBytes for Vec2 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Vec2 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Vec3 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Vec3 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Vec4 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Vec4 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Mat2 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Mat2 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Mat3 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Mat3 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Mat4 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Mat4 {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl AsBytes for Quat {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}
unsafe impl FromBytes for Quat {
fn only_derive_is_allowed_to_implement_this_trait()
where
Self: Sized,
{
}
}