Trait X2BasicInterface

Source
pub trait X2BasicInterface: X2NominalInterface {
    // Required method
    fn make(_0: Self::Scalar, _1: Self::Scalar) -> Self;

    // Provided methods
    fn make_nan() -> Self
       where Self: Sized { ... }
    fn make_default() -> Self
       where Self: Sized { ... }
}
Expand description

Standard interface of vector X2. Implements nominal interface, extending it by constructor make.

Required Methods§

Source

fn make(_0: Self::Scalar, _1: Self::Scalar) -> Self

Constructor.

Provided Methods§

Source

fn make_nan() -> Self
where Self: Sized,

Make an instance filling fields with NaN.

Source

fn make_default() -> Self
where Self: Sized,

Make an instance filling fields with default values.

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<Scalar> X2BasicInterface for [Scalar; 2]
where Scalar: ScalarInterface,

Source§

fn make(_0: Self::Scalar, _1: Self::Scalar) -> Self

Source§

impl<Scalar> X2BasicInterface for (Scalar, Scalar)
where Scalar: ScalarInterface,

Source§

fn make(_0: Self::Scalar, _1: Self::Scalar) -> Self

Implementors§

Source§

impl<Scalar> X2BasicInterface for math_adapter::cgmath::Point2<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for math_adapter::cgmath::Vector2<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for LogicalPosition<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for LogicalSize<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for PhysicalPosition<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for PhysicalSize<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for X2<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for math_adapter::nalgebra::Point2<Scalar>
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2BasicInterface for math_adapter::nalgebra::Vector2<Scalar>
where Scalar: ScalarInterface,