Skip to main content

Exact

Trait Exact 

Source
pub trait Exact: Sized {
    // Required methods
    fn write<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
    fn read<'de, D: Deserializer<'de>>(
        deserializer: D,
    ) -> Result<Self, D::Error>;
}
Expand description

A value written exactly (Exact::write) and read back as written (Exact::read).

Required Methods§

Source

fn write<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Source

fn read<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Exact> Exact for Vec<T>

Its elements, each exactly.

Source§

fn write<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Source§

fn read<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Implementors§

Source§

impl Exact for CoordinateSystem

Its origin and axes, each exactly (crate::exact); read back, the reciprocal basis is computed again from them, as it was.

Source§

impl Exact for Pose

Its position and its rotation’s quaternion, each component exactly — the quaternion as it is, not normalized: what a value kept to be read again holds (crate::exact).

Source§

impl Exact for Scalar

A sharp scalar as its number, any other as [lo, hi]. Sharp to the bit: [-0, 0] is not sharp, and is written as both.

Source§

impl<const N: usize> Exact for Vector<N>

Its components, each exactly.