#[repr(C)]
pub struct X2<Scalar>(pub Scalar, pub Scalar) where Scalar: ScalarInterface;
Expand description

Vector X2

Tuple Fields§

§0: Scalar§1: Scalar

Trait Implementations§

Source§

impl<Scalar> Clone for X2<Scalar>
where Scalar: Clone + ScalarInterface,

Source§

fn clone(&self) -> X2<Scalar>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Scalar> Default for X2<Scalar>
where Scalar: Default + ScalarInterface,

Source§

fn default() -> X2<Scalar>

Returns the “default value” for a type. Read more
Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Scalar> Hash for X2<Scalar>
where Scalar: Hash + ScalarInterface,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<Scalar> PartialEq for X2<Scalar>
where Scalar: PartialEq + ScalarInterface,

Source§

fn eq(&self, other: &X2<Scalar>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

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

Source§

fn make( _0: <X2<Scalar> as X2NominalInterface>::Scalar, _1: <X2<Scalar> as X2NominalInterface>::Scalar, ) -> X2<Scalar>

Constructor.
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.
Source§

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

Source§

fn _0_ref(&self) -> &<X2<Scalar> as X2NominalInterface>::Scalar

First element.
Source§

fn _1_ref(&self) -> &<X2<Scalar> as X2NominalInterface>::Scalar

Second element.
Source§

fn _0_mut(&mut self) -> &mut <X2<Scalar> as X2NominalInterface>::Scalar

First element.
Source§

fn _1_mut(&mut self) -> &mut <X2<Scalar> as X2NominalInterface>::Scalar

Second element.
Source§

fn as_canonical(&self) -> &X2<<X2<Scalar> as X2NominalInterface>::Scalar>

Canonical representation of the vector.
Source§

fn as_canonical_mut( &mut self, ) -> &mut X2<<X2<Scalar> as X2NominalInterface>::Scalar>

Mutable canonical representation of the vector.
Source§

fn assign<Src>(&mut self, src: Src)
where Src: X2BasicInterface<Scalar = Self::Scalar>,

Assign value.
Source§

fn x_ref(&self) -> &Self::Scalar

First element.
Source§

fn y_ref(&self) -> &Self::Scalar

Second element.
Source§

fn x_mut(&mut self) -> &mut Self::Scalar

First element.
Source§

fn y_mut(&mut self) -> &mut Self::Scalar

Second element.
Source§

fn as_tuple(&self) -> &(Self::Scalar, Self::Scalar)

Interpret as tuple.
Source§

fn as_array(&self) -> &[Self::Scalar; 2]

Interpret as array.
Source§

fn as_slice(&self) -> &[Self::Scalar]

Interpret as slice.
Source§

fn as_tuple_mut(&mut self) -> &mut (Self::Scalar, Self::Scalar)

Interpret as mutable tuple.
Source§

fn as_array_mut(&mut self) -> &mut [Self::Scalar; 2]

Interpret as mutable array.
Source§

fn as_slice_mut(&mut self) -> &mut [Self::Scalar]

Interpret as mutable slice.
Source§

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

Source§

type Scalar = Scalar

Type of element.
Source§

fn _0(&self) -> <X2<Scalar> as X2NominalInterface>::Scalar

First element.
Source§

fn _1(&self) -> <X2<Scalar> as X2NominalInterface>::Scalar

Second element.
Source§

fn x(&self) -> Self::Scalar

First element.
Source§

fn y(&self) -> Self::Scalar

Second element.
Source§

fn clone_as_tuple(&self) -> (Self::Scalar, Self::Scalar)

Clone as tuple.
Source§

fn clone_as_array(&self) -> [Self::Scalar; 2]

Clone as array.
Source§

fn clone_as_canonical(&self) -> X2<Self::Scalar>

Clone as canonical.
Source§

impl<Scalar> Copy for X2<Scalar>
where Scalar: Copy + ScalarInterface,

Source§

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

Auto Trait Implementations§

§

impl<Scalar> Freeze for X2<Scalar>
where Scalar: Freeze,

§

impl<Scalar> RefUnwindSafe for X2<Scalar>
where Scalar: RefUnwindSafe,

§

impl<Scalar> Send for X2<Scalar>
where Scalar: Send,

§

impl<Scalar> Sync for X2<Scalar>
where Scalar: Sync,

§

impl<Scalar> Unpin for X2<Scalar>
where Scalar: Unpin,

§

impl<Scalar> UnwindSafe for X2<Scalar>
where Scalar: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<Scalar, Original, Target> From2<Original> for Target
where Scalar: ScalarInterface, Original: X2NominalInterface<Scalar = Scalar>, Target: X2BasicInterface<Scalar = Scalar>,

Source§

fn from2(original: Original) -> Target

Performs the conversion.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Target, Original> Into2<Target> for Original
where Target: From2<Original>,

Source§

fn into2(self) -> Target

Performs the conversion.
Source§

impl<T> IntoResult<T> for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Target, Original> VectorizedInto<Target> for Original
where Target: VectorizedFrom<Original>,

Source§

fn vectorized_into(self) -> Target

Performs the conversion.