pub trait X2Interface {
type Scalar: ScalarInterface;
// Required methods
fn _0(&self) -> Self::Scalar;
fn _1(&self) -> Self::Scalar;
// Provided methods
fn x(&self) -> Self::Scalar { ... }
fn y(&self) -> Self::Scalar { ... }
fn clone_as_tuple(&self) -> (Self::Scalar, Self::Scalar) { ... }
fn clone_as_array(&self) -> [Self::Scalar; 2] { ... }
fn clone_as_canonical(&self) -> X2<Self::Scalar> { ... }
}
Expand description
Nominal interface of vector X2.
Required Associated Types§
Sourcetype Scalar: ScalarInterface
type Scalar: ScalarInterface
Type of element.
Required Methods§
Provided Methods§
Sourcefn clone_as_tuple(&self) -> (Self::Scalar, Self::Scalar)
fn clone_as_tuple(&self) -> (Self::Scalar, Self::Scalar)
Clone as tuple.
Sourcefn clone_as_array(&self) -> [Self::Scalar; 2]
fn clone_as_array(&self) -> [Self::Scalar; 2]
Clone as array.
Sourcefn clone_as_canonical(&self) -> X2<Self::Scalar>
fn clone_as_canonical(&self) -> X2<Self::Scalar>
Clone as canonical.