Trait PackFloat

Source
pub trait PackFloat {
    // Required methods
    fn size() -> usize;
    fn pack_float_to(&self, buffer: &mut [f32]);
}
Expand description

Something that could be packed to f32 buffers

Required Methods§

Source

fn size() -> usize

Size of float part of an object.

Source

fn pack_float_to(&self, buffer: &mut [f32])

Write an object into f32 buffer.

Buffer must be of size greater or equal to object’s one.

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.

Implementations on Foreign Types§

Source§

impl PackFloat for f32

Source§

fn size() -> usize

Source§

fn pack_float_to(&self, buffer: &mut [f32])

Source§

impl PackFloat for f64

Source§

fn size() -> usize

Source§

fn pack_float_to(&self, buffer: &mut [f32])

Source§

impl<T: PackFloat + Scalar> PackFloat for Matrix3<T>

Source§

fn size() -> usize

Source§

fn pack_float_to(&self, buffer: &mut [f32])

Source§

impl<T: PackFloat + Scalar> PackFloat for Vector3<T>

Source§

fn size() -> usize

Source§

fn pack_float_to(&self, buffer: &mut [f32])

Implementors§