RectangleOf

Struct RectangleOf 

Source
#[repr(C)]
pub struct RectangleOf<T> { pub pos: T, pub size: T, }
Expand description

A N dimension rectangle

Fields§

§pos: T§size: T

Implementations§

Source§

impl<T> RectangleOf<T>

Source

pub const fn from_array(array: [T; 2]) -> Self

Source

pub const fn to_array(self) -> [T; 2]

Source

pub const fn array(&self) -> &[T; 2]

Source

pub const fn array_mut(&mut self) -> &mut [T; 2]

Source

pub fn max(self, other: Self) -> Self
where Self: Max,

Max function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn min(self, other: Self) -> Self
where Self: Min,

Min function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn abs(self) -> <Self as Abs>::Output
where Self: Abs,

Absolute value in a component way.

§Overflow behavior

The absolute value of iX::MIN cannot be represented as an iX, and attempting to calculate it will cause an overflow. This means that code in debug mode will trigger a panic on this case and optimized code will return iX::MIN without a panic.

Can cause a panic for grid if the size mismatch

Source

pub fn mix<C>(self, other: Self, coef: C) -> Self
where Self: Mix<C>, C: Float,

Mix function in a component way

The coef is clamped between 0.0..1.

  1. => self,
  2. => dest.

Can cause a panic for grid if the size mismatch

Source

pub fn mix_unchecked<C>(self, other: Self, coef: C) -> Self
where Self: Mix<C>, C: Float,

Mix function in a component way

The coef is not clamped between 0.0..1.

  1. => self,
  2. => dest.

Can cause a panic for grid if the size mismatch

Source

pub fn clamp(self, min_val: Self, max_val: Self) -> Self
where Self: Clamp,

Clamp function in a component way

Clamps self between min_val and max_val (inclusive)

Can cause a panic for grid if the size mismatch

Source§

impl<T> RectangleOf<T>
where T: Number,

Source

pub const SIZED_ONE: Self

Source§

impl<T> RectangleOf<Vector<T, 2>>
where T: Number,

Source

pub fn down_left(&self) -> Vector<T, 2>

Source

pub fn down_right(&self) -> Vector<T, 2>
where T: One + Mul<T, Output = T> + Add<T, Output = T>,

Source

pub fn bottom_left(&self) -> Vector<T, 2>

Same as down_left()

Source

pub fn bottom_right(&self) -> Vector<T, 2>
where T: One + Mul<T, Output = T> + Add<T, Output = T>,

Same as down_right()

Source

pub fn up_right(&self) -> Vector<T, 2>
where T: Add<T, Output = T>,

Source

pub fn up_left(&self) -> Vector<T, 2>
where T: One + Mul<T, Output = T> + Add<T, Output = T>,

Source

pub fn top_right(&self) -> Vector<T, 2>
where T: Add<T, Output = T>,

Same as up_right()

Source

pub fn top_left(&self) -> Vector<T, 2>
where T: One + Mul<T, Output = T> + Add<T, Output = T>,

Same as up_left()

Source§

impl<T, const N: usize> RectangleOf<Vector<T, N>>
where Vector<T, N>: Number, T: Number,

Source

pub fn new_centered(pos_middle: Vector<T, N>, size: Vector<T, N>) -> Self

Source

pub fn new_with_center( bottom_left: Vector<T, N>, size: Vector<T, N>, center_coef: Vector<T, N>, ) -> Self

Source

pub fn get_coef(&self, coef: Vector<T, N>) -> Vector<T, N>
where Vector<T, N>: Arithmetic,

Source

pub fn middle(&self) -> Vector<T, N>

The center of the coordinate, whatever the dimension

Source

pub fn center(&self) -> Vector<T, N>

Source

pub fn middle_right(&self) -> Vector<T, N>
where Vector<T, N>: HaveX<T>,

Source

pub fn middle_left(&self) -> Vector<T, N>
where Vector<T, N>: HaveX<T>,

Source

pub fn middle_up(&self) -> Vector<T, N>
where Vector<T, N>: HaveY<T>,

Source

pub fn middle_down(&self) -> Vector<T, N>
where Vector<T, N>: HaveY<T>,

Source

pub fn middle_forward(&self) -> Vector<T, N>
where Vector<T, N>: HaveZ<T>,

Source

pub fn middle_backward(&self) -> Vector<T, N>
where Vector<T, N>: HaveZ<T>,

Source

pub fn middle_ana(&self) -> Vector<T, N>
where Vector<T, N>: HaveW<T>,

Source

pub fn middle_kata(&self) -> Vector<T, N>
where Vector<T, N>: HaveW<T>,

Source

pub fn right_value(&self) -> T
where Vector<T, N>: HaveX<T>,

Source

pub fn left_value(&self) -> T
where Vector<T, N>: HaveX<T>,

Source

pub fn up_value(&self) -> T
where Vector<T, N>: HaveY<T>,

Source

pub fn down_value(&self) -> T
where Vector<T, N>: HaveY<T>,

Source

pub fn top_value(&self) -> T
where Vector<T, N>: HaveY<T>,

Same as up_value()

Source

pub fn bottom_value(&self) -> T
where Vector<T, N>: HaveY<T>,

Same as down_value()

Source

pub fn forward_value(&self) -> T
where Vector<T, N>: HaveZ<T>,

Source

pub fn backward_value(&self) -> T
where Vector<T, N>: HaveZ<T>,

Source

pub fn ana_value(&self) -> T
where Vector<T, N>: HaveW<T>,

Source

pub fn kata_value(&self) -> T
where Vector<T, N>: HaveW<T>,

Source§

impl<T, const N: usize> RectangleOf<Vector<T, N>>
where T: Primitive,

Source

pub fn split_axis(&self, nb: T, axis: usize) -> impl Iterator<Item = Self>

Source

pub fn split_x(&self, nb: T) -> impl Iterator<Item = Self>
where Vector<T, N>: HaveX<T>,

Source

pub fn split_y(&self, nb: T) -> impl Iterator<Item = Self>
where Vector<T, N>: HaveY<T>,

Source

pub fn split_z(&self, nb: T) -> impl Iterator<Item = Self>
where Vector<T, N>: HaveZ<T>,

Source

pub fn split_w(&self, nb: T) -> impl Iterator<Item = Self>
where Vector<T, N>: HaveW<T>,

Source

pub fn split_min(&self, nb: T) -> impl Iterator<Item = Self>

Source

pub fn split_max(&self, nb: T) -> impl Iterator<Item = Self>

Source§

impl<T, const N: usize> RectangleOf<Vector<T, N>>
where T: Number,

Source

pub fn is_inside(&self, point: Vector<T, N>) -> bool

Check if a point inside the rectangle. Also work for indexing

use hexga_math::prelude::*;

// inside :
assert!(rect2i(0, 0, 2, 2).is_inside(point2(1, 1)));
assert!(rect2i(0, 0, 2, 2).is_inside(point2(0, 0)));


// not inside :
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(2, 0)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(0, 2)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(2, 2)));

assert!(!rect2i(0, 0, 2, 2).is_inside(point2( 3,   3)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(-1,  -1)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(-1,  -1)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2( 1,  10)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2( 1, -10)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2(-10,  1)));
assert!(!rect2i(0, 0, 2, 2).is_inside(point2( 10,  1)));
Source

pub fn is_inside_inclusif(&self, point: Vector<T, N>) -> bool

Check if a point inside the rectangle. Don’t work for indexing

Source

pub fn is_rect_inside(&self, rect: Rectangle<T, N>) -> bool

Source

pub fn is_empty(&self) -> bool

Source

pub fn clamp_vector(&self, vector: Vector<T, N>) -> Vector<T, N>
where Vector<T, N>: Clamp,

Source

pub fn intersect_or_empty(self, other: Self) -> Self
where Vector<T, N>: Max + Min,

Source

pub fn intersect(self, other: Self) -> Option<Self>
where Vector<T, N>: Max + Min,

None if any rectangle is empty

Source§

impl<T> RectangleOf<T>

Source

pub const fn new(pos: T, size: T) -> Self

assume the size is valid

Source

pub const fn new_sized(size: T) -> Self
where T: Zero,

assume the size is valid

Source§

impl<T, const N: usize> RectangleOf<Vector<T, N>>
where T: Number,

Source

pub fn from_pos_to_pos(start_pos: Vector<T, N>, end_pos: Vector<T, N>) -> Self

Trait Implementations§

Source§

impl<T> Add<T> for RectangleOf<T>
where T: Add<T> + Copy,

Source§

type Output = RectangleOf<<T as Add>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for RectangleOf<T>
where T: Add<T>,

Source§

type Output = RectangleOf<<T as Add>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign<&RectangleOf<T>> for RectangleOf<T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign for RectangleOf<T>
where T: AddAssign,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T> Array<T, 2> for RectangleOf<T>

Source§

fn array(&self) -> &[T; 2]

Source§

fn array_mut(&mut self) -> &mut [T; 2]

Source§

const DIMENSION: usize = N

Source§

fn to_array_resized<const M: usize>(self) -> [T; M]
where T: Default,

Fill non existing component with Default
Source§

fn to_array_resized_with_value<const M: usize>(self, fill: T) -> [T; M]
where T: Clone,

Fill non existing component with the Cloned given value
Source§

impl<T> ArrayWithType<T, 2> for RectangleOf<T>

Source§

impl<T> AsMut<[T; 2]> for RectangleOf<T>

Source§

fn as_mut(&mut self) -> &mut [T; 2]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsRef<[T; 2]> for RectangleOf<T>

Source§

fn as_ref(&self) -> &[T; 2]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> Binary for RectangleOf<T>
where T: Binary,

Source§

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

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

impl<T> BitAnd<T> for RectangleOf<T>
where T: BitAnd<T> + Copy,

Source§

type Output = RectangleOf<<T as BitAnd>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T> BitAnd for RectangleOf<T>
where T: BitAnd<T>,

Source§

type Output = RectangleOf<<T as BitAnd>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<T> BitAndAssign<&RectangleOf<T>> for RectangleOf<T>
where T: BitAndAssign + Copy,

Source§

fn bitand_assign(&mut self, rhs: &Self)

Performs the &= operation. Read more
Source§

impl<T> BitAndAssign for RectangleOf<T>
where T: BitAndAssign,

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<T> BitOr<T> for RectangleOf<T>
where T: BitOr<T> + Copy,

Source§

type Output = RectangleOf<<T as BitOr>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T> BitOr for RectangleOf<T>
where T: BitOr<T>,

Source§

type Output = RectangleOf<<T as BitOr>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<T> BitOrAssign<&RectangleOf<T>> for RectangleOf<T>
where T: BitOrAssign + Copy,

Source§

fn bitor_assign(&mut self, rhs: &Self)

Performs the |= operation. Read more
Source§

impl<T> BitOrAssign for RectangleOf<T>
where T: BitOrAssign,

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

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

Source§

fn clone(&self) -> Self

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<T> Debug for RectangleOf<T>
where T: Debug,

Source§

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

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

impl<T> Default for RectangleOf<T>
where T: Number,

Source§

fn default() -> Self

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

impl<'de, T> Deserialize<'de> for RectangleOf<T>
where T: Deserialize<'de>,

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Display for RectangleOf<T>
where T: Display,

Source§

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

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

impl<T> Div<T> for RectangleOf<T>
where T: Div<T> + Copy,

Source§

type Output = RectangleOf<<T as Div>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div for RectangleOf<T>
where T: Div<T>,

Source§

type Output = RectangleOf<<T as Div>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> DivAssign<&RectangleOf<T>> for RectangleOf<T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: &Self)

Performs the /= operation. Read more
Source§

impl<T> DivAssign for RectangleOf<T>
where T: DivAssign,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<T> From<[T; 2]> for RectangleOf<T>

Source§

fn from(value: [T; 2]) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T)> for RectangleOf<T>

Source§

fn from(value: (T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<RectangleOf<T>> for [T; 2]

Source§

fn from(value: RectangleOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<RectangleOf<T>> for (T, T)

Source§

fn from(value: RectangleOf<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, Idx> Get<Idx> for RectangleOf<T>
where [T; 2]: Get<Idx>,

Source§

type Output = <[T; 2] as Get<Idx>>::Output

Source§

fn get(&self, index: Idx) -> Option<&Self::Output>

Returns a reference to the value.
Source§

unsafe fn get_unchecked(&self, index: Idx) -> &Self::Output

Returns a reference to the value.
Source§

fn get_or_panic(&self, index: Idx) -> &Self::Output

Returns a reference to the value.
Source§

fn is_index_valid(&self, index: Idx) -> bool

True if get(index) return Some, false otherwise.
Source§

fn is_index_invalid(&self, index: Idx) -> bool

True if get(index) return None, false otherwise.
Source§

impl<T, Idx> GetManyMut<Idx> for RectangleOf<T>
where [T; 2]: GetManyMut<Idx>,

Source§

fn try_get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Result<[&mut Self::Output; N], ManyMutError>

Source§

fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut Self::Output; N]>

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

fn get_many_mut_or_panic<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]

Returns multiples mutables references to the values. All values that can be accessed with the indices must be disjoint.
Source§

fn swap(&mut self, a: Idx, b: Idx) -> bool
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap_or_panic(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

unsafe fn swap_unchecked(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

impl<T, Idx> GetMut<Idx> for RectangleOf<T>
where [T; 2]: GetMut<Idx>,

Source§

fn get_mut(&mut self, index: Idx) -> Option<&mut Self::Output>

Returns a mutable reference to the value.
Source§

unsafe fn get_unchecked_mut(&mut self, index: Idx) -> &mut Self::Output

Returns a mutable reference to the value.
Source§

fn get_mut_or_panic(&mut self, idx: Idx) -> &mut Self::Output

Source§

fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn set(&mut self, index: Idx, value: Self::Output) -> bool
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Source§

impl<T> Half for RectangleOf<T>
where T: Half + Copy,

Source§

const HALF: Self

Source§

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

Source§

fn set_half(&mut self) -> &mut Self

Source§

fn is_half(self) -> bool
where Self: PartialEq,

Source§

fn is_non_half(self) -> bool
where Self: PartialEq,

Source§

impl<T> Hash for RectangleOf<T>
where T: Hash,

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<T, Idx> Index<Idx> for RectangleOf<T>
where [T; 2]: Index<Idx>,

Source§

type Output = <[T; 2] as Index<Idx>>::Output

The returned type after indexing.
Source§

fn index(&self, index: Idx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, Idx> IndexMut<Idx> for RectangleOf<T>
where [T; 2]: IndexMut<Idx>,

Source§

fn index_mut(&mut self, index: Idx) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T> IntoIterator for &'a RectangleOf<T>
where &'a [T; 2]: IntoIterator,

Source§

type Item = <&'a [T; 2] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'a [T; 2] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut RectangleOf<T>
where &'a mut [T; 2]: IntoIterator,

Source§

type Item = <&'a mut [T; 2] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'a mut [T; 2] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator for RectangleOf<T>

Source§

type Item = <[T; 2] as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <[T; 2] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> LowerExp for RectangleOf<T>
where T: LowerExp,

Source§

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

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

impl<T> LowerHex for RectangleOf<T>
where T: LowerHex,

Source§

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

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

impl<T> Map for RectangleOf<T>

Source§

type WithType<T2> = RectangleOf<T2>

Source§

fn map<T2, F>(self, f: F) -> Self::WithType<T2>
where F: FnMut(Self::Item) -> T2,

Apply f to each item, returning a container of the mapped values.
Source§

impl<T> MapIntern for RectangleOf<T>

Source§

type Item = T

Source§

fn map_intern<F>(self, f: F) -> Self
where F: FnMut(Self::Item) -> Self::Item,

Apply f to each item, producing a new container of the same type.
Source§

impl<T> MapInternWith for RectangleOf<T>

Source§

fn map_with_intern<F>(self, other: Self, f: F) -> Self
where F: FnMut(Self::Item, Self::Item) -> Self::Item,

Combine self and other elementwise with f.
Source§

impl<T> MapWith for RectangleOf<T>

Source§

fn map_with<R, Item2, F>( self, other: Self::WithType<Item2>, f: F, ) -> Self::WithType<R>
where F: FnMut(Self::Item, Item2) -> R,

Combine self and other elementwise with f, producing a new container of the mapped values.
Source§

impl<T> MaxValue for RectangleOf<T>
where T: MaxValue + Copy,

Source§

const MAX: Self

Source§

fn is_max_value(&self) -> bool
where Self: PartialEq,

Source§

fn is_not_max_value(&self) -> bool
where Self: PartialEq,

Source§

impl<T> MinValue for RectangleOf<T>
where T: MinValue + Copy,

Source§

const MIN: Self

Source§

fn is_min_value(&self) -> bool
where Self: PartialEq,

Source§

fn is_not_min_value(&self) -> bool
where Self: PartialEq,

Source§

impl<T> MinusOne for RectangleOf<T>
where T: MinusOne + Copy,

Source§

const MINUS_ONE: Self

Source§

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

Source§

fn set_minus_one(&mut self) -> &mut Self

Source§

fn is_minus_one(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_minus_one(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Mul<T> for RectangleOf<T>
where T: Mul<T> + Copy,

Source§

type Output = RectangleOf<<T as Mul>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul for RectangleOf<T>
where T: Mul<T>,

Source§

type Output = RectangleOf<<T as Mul>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> MulAssign<&RectangleOf<T>> for RectangleOf<T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
Source§

impl<T> MulAssign for RectangleOf<T>
where T: MulAssign,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<T> NaNValue for RectangleOf<T>
where T: NaNValue + Copy,

Source§

const NAN: Self

Source§

fn is_nan(&self) -> bool
where Self: PartialEq,

Source§

fn is_not_nan(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Neg for RectangleOf<T>
where T: Neg,

Source§

type Output = RectangleOf<<T as Neg>::Output>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T> Not for RectangleOf<T>
where T: Not,

Source§

type Output = RectangleOf<<T as Not>::Output>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<T> Octal for RectangleOf<T>
where T: Octal,

Source§

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

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

impl<T> One for RectangleOf<T>
where T: One + Copy,

Source§

const ONE: Self

The neutral element of the multiplication such that x * X::ONE = x
Source§

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

Source§

fn set_one(&mut self) -> &mut Self

Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_one(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Ord for RectangleOf<T>
where T: Ord,

Source§

fn cmp(&self, rhs: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq for RectangleOf<T>
where T: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> 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<T> PartialOrd for RectangleOf<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Pointer for RectangleOf<T>
where T: Pointer,

Source§

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

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

impl<T> Product for RectangleOf<T>
where Self: One + Mul<Self, Output = Self>,

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<T> Rem<T> for RectangleOf<T>
where T: Rem<T> + Copy,

Source§

type Output = RectangleOf<<T as Rem>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> Rem for RectangleOf<T>
where T: Rem<T>,

Source§

type Output = RectangleOf<<T as Rem>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<T> RemAssign<&RectangleOf<T>> for RectangleOf<T>
where T: RemAssign + Copy,

Source§

fn rem_assign(&mut self, rhs: &Self)

Performs the %= operation. Read more
Source§

impl<T> RemAssign for RectangleOf<T>
where T: RemAssign,

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<T> Serialize for RectangleOf<T>
where T: Serialize,

Available on crate feature serde only.
Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> Shl<T> for RectangleOf<T>
where T: Shl<T> + Copy,

Source§

type Output = RectangleOf<<T as Shl>::Output>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<T> Shl for RectangleOf<T>
where T: Shl<T>,

Source§

type Output = RectangleOf<<T as Shl>::Output>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: Self) -> Self::Output

Performs the << operation. Read more
Source§

impl<T> ShlAssign<&RectangleOf<T>> for RectangleOf<T>
where T: ShlAssign + Copy,

Source§

fn shl_assign(&mut self, rhs: &Self)

Performs the <<= operation. Read more
Source§

impl<T> ShlAssign for RectangleOf<T>
where T: ShlAssign,

Source§

fn shl_assign(&mut self, rhs: Self)

Performs the <<= operation. Read more
Source§

impl<T> Shr<T> for RectangleOf<T>
where T: Shr<T> + Copy,

Source§

type Output = RectangleOf<<T as Shr>::Output>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T> Shr for RectangleOf<T>
where T: Shr<T>,

Source§

type Output = RectangleOf<<T as Shr>::Output>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: Self) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T> ShrAssign<&RectangleOf<T>> for RectangleOf<T>
where T: ShrAssign + Copy,

Source§

fn shr_assign(&mut self, rhs: &Self)

Performs the >>= operation. Read more
Source§

impl<T> ShrAssign for RectangleOf<T>
where T: ShrAssign,

Source§

fn shr_assign(&mut self, rhs: Self)

Performs the >>= operation. Read more
Source§

impl<T> Sub<T> for RectangleOf<T>
where T: Sub<T> + Copy,

Source§

type Output = RectangleOf<<T as Sub>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for RectangleOf<T>
where T: Sub<T>,

Source§

type Output = RectangleOf<<T as Sub>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> SubAssign<&RectangleOf<T>> for RectangleOf<T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for RectangleOf<T>
where T: SubAssign,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> Sum for RectangleOf<T>
where Self: Zero + Add<Self, Output = Self>,

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<T, Idx> TryGet<Idx> for RectangleOf<T>
where [T; 2]: TryGet<Idx>,

Source§

type Error = <[T; 2] as TryGet<Idx>>::Error

Source§

fn try_get(&self, index: Idx) -> Result<&Self::Output, Self::Error>

Returns a reference to the value.
Source§

impl<T, Idx> TryGetMut<Idx> for RectangleOf<T>
where [T; 2]: TryGetMut<Idx>,

Source§

fn try_get_mut(&mut self, index: Idx) -> Result<&mut Self::Output, Self::Error>

Returns a mutable reference to the value.
Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, Self::Error>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn try_set( &mut self, index: Idx, value: Self::Output, ) -> Result<(), Self::Error>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

impl<T> UpperExp for RectangleOf<T>
where T: UpperExp,

Source§

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

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

impl<T> UpperHex for RectangleOf<T>
where T: UpperHex,

Source§

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

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

impl<T> Zero for RectangleOf<T>
where T: Zero + Copy,

Source§

const ZERO: Self

The absorbing element of the multiplication such that x * X::ZERO = X::ZERO
Source§

fn zero() -> Self

Source§

fn set_zero(&mut self) -> &mut Self

Source§

fn is_zero(&self) -> bool
where Self: PartialEq,

Source§

fn is_non_zero(&self) -> bool
where Self: PartialEq,

Source§

impl<T> Copy for RectangleOf<T>
where T: Copy,

Source§

impl<T> Eq for RectangleOf<T>
where T: Eq,

Auto Trait Implementations§

§

impl<T> Freeze for RectangleOf<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for RectangleOf<T>
where T: RefUnwindSafe,

§

impl<T> Send for RectangleOf<T>
where T: Send,

§

impl<T> Sync for RectangleOf<T>
where T: Sync,

§

impl<T> Unpin for RectangleOf<T>
where T: Unpin,

§

impl<T> UnwindSafe for RectangleOf<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<S> Abs for S
where S: Map, <S as MapIntern>::Item: Abs,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as Abs>::Output>

Source§

fn abs(self) -> <S as Abs>::Output

Absolute value in a component way. Read more
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<S, T, const N: usize> ArrayMax<T, N> for S
where S: Array<T, N>,

Source§

fn max_element_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn max_element_by_key<F, K>(&self, f: F) -> &T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn max_element_mut_by<F>(&mut self, compare: F) -> &mut T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn max_element_mut_by_key<F, K>(&mut self, f: F) -> &mut T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn max_element(&self) -> &T
where T: PartialOrd,

Source§

fn max_element_mut(&mut self) -> &mut T
where T: PartialOrd,

Source§

fn max_element_idx(&self) -> usize
where T: PartialOrd,

Source§

impl<S, T, const N: usize> ArrayMin<T, N> for S
where S: Array<T, N>,

Source§

fn min_element_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn min_element_by_key<F, K>(&self, f: F) -> &T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn min_element_mut_by<F>(&mut self, compare: F) -> &mut T
where F: FnMut(&T, &T) -> Ordering,

Source§

fn min_element_mut_by_key<F, K>(&mut self, f: F) -> &mut T
where F: FnMut(&T) -> K, K: Ord,

Source§

fn min_element(&self) -> &T
where T: PartialOrd,

Source§

fn min_element_mut(&mut self) -> &mut T
where T: PartialOrd,

Source§

fn min_element_idx(&self) -> usize
where T: PartialOrd,

Source§

impl<C, T, const N: usize> AsArray<T, N> for C
where C: AsRef<[T; N]>,

Source§

fn as_array(&self) -> &[T; N]

Source§

impl<C, T, const N: usize> AsArrayMut<T, N> for C
where C: AsMut<[T; N]>,

Source§

fn as_array_mut(&mut self) -> &mut [T; N]

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<C1, C2> CastFrom<C2> for C1
where C1: Map, C2: Map<WithType<<C1 as MapIntern>::Item> = C1>, <C1 as MapIntern>::Item: CastFrom<<C2 as MapIntern>::Item>,

Source§

fn cast_from(value: C2) -> C1

Source§

impl<S, T> CastInto<T> for S
where T: CastFrom<S>,

Source§

fn cast_into(self) -> T

Source§

impl<C1, C2> CastRangeFrom<C2> for C1
where C1: Map, C2: Map<WithType<<C1 as MapIntern>::Item> = C1>, <C1 as MapIntern>::Item: CastRangeFrom<<C2 as MapIntern>::Item>,

Source§

fn cast_range_from(value: C2) -> C1

Source§

impl<S, T> CastRangeInto<T> for S
where T: CastRangeFrom<S>,

Source§

impl<T> Clamp for T
where T: Min + Max,

Source§

fn clamp_elementwise(self, min_val: T, max_val: T) -> T

Clamp function in a component way 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<I, T> CollectExtension<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_vec(self) -> Vec<T>

Source§

fn to_linkedlist(self) -> LinkedList<T>

Source§

fn to_vecdeque(self) -> VecDeque<T>

Source§

fn to_hashset(self) -> HashSet<T>
where T: Eq + Hash,

Source§

fn to_btreeset(self) -> BTreeSet<T>
where T: Ord,

Source§

impl<I, T1, T2> CollectMapExtension<T1, T2> for I
where I: IntoIterator<Item = (T1, T2)>,

Source§

fn to_hashmap(self) -> HashMap<T1, T2>
where T1: Eq + Hash,

Source§

fn to_btreemap(self) -> BTreeMap<T1, T2>
where T1: Ord,

Source§

impl<T> Decrement for T
where T: One + Sub<Output = T> + SubAssign + Copy,

Source§

fn decrement(&mut self)

The decrement x-- operator
Source§

fn decrement_checked(&mut self) -> Result<(), ()>

The increment x-- operator
Source§

fn can_decrement(&self) -> bool

Do the current value have a predecessor. Read more
Source§

fn predecessor(self) -> Self

Return the predecessor self - 1
Source§

fn predecessor_checked(&mut self) -> Result<Self, ()>

Return the predecessor self - 1
Source§

fn have_predecessor(self) -> bool

Do the current value have a predecessor. Read more
Source§

impl<T> DefaultExtension for T
where T: Default + PartialEq,

Source§

impl<T> DefaultIsTripleUnderscore for T
where T: Default,

Source§

fn ___() -> T

The Self::default() method. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<C, T, const N: usize> FromArray<T, N> for C
where C: From<[T; N]>,

Source§

fn from_array(value: [T; N]) -> Self

Source§

fn from_fn<F>(f: F) -> Self
where F: FnMut(usize) -> T,

Source§

fn splat(val: T) -> Self
where T: Clone,

Source§

impl<T> Getter<T> for T
where T: Copy,

Source§

fn get(&self) -> T

Source§

impl<T> HasMut<T> for T

Source§

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

Source§

impl<T> HasRef<T> for T

Source§

fn retrive(&self) -> &T

Source§

impl<T> Increment for T
where T: One + Add<Output = T> + AddAssign + Copy,

Source§

fn increment(&mut self)

The increment x++ operator
Source§

fn increment_checked(&mut self) -> Result<(), ()>

The increment x++ operator
Source§

fn can_increment(&self) -> bool

Do the current value have a successor. Read more
Source§

fn successor(self) -> Self

Return the successor self + 1
Source§

fn successor_checked(&mut self) -> Result<Self, ()>

Return the successor self + 1
Source§

fn have_successor(self) -> bool

Do the current value have a successor. Read more
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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, Item, T> IterExtension<'a, Item> for T
where &'a T: IntoIterator<Item = Item> + 'a,

Source§

fn iter(&'a self) -> <&'a Self as IntoIterator>::IntoIter

Source§

fn any<P>(&'a self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source§

fn all<P>(&'a self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source§

fn for_each<F>(&'a self, f: F)
where F: FnMut(Item),

Source§

fn any_with<P, O>(&'a self, other: &'a O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, &'a O: IntoIterator<Item = Item>,

Source§

fn all_with<P, O>(&'a self, other: &'a O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, &'a O: IntoIterator<Item = Item>,

Source§

impl<S> Max for S
where S: MapInternWith, <S as MapIntern>::Item: Max,

Source§

fn max_elementwise(self, other: S) -> S

Max function in a component way Read more
Source§

impl<S> Min for S
where S: MapInternWith, <S as MapIntern>::Item: Min,

Source§

fn min_elementwise(self, other: S) -> S

Min function in a component way Read more
Source§

impl<T, Z> MinusOneIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: MinusOne + PartialEq,

Source§

impl<S, F> Mix<F> for S
where S: MapInternWith, <S as MapIntern>::Item: Mix<F>, F: Float,

Source§

fn mix_unchecked(self, dest: S, coef: F) -> S

Mix function in a component way Read more
Source§

fn mix(self, dest: Self, coef: C) -> Self

Mix function in a component way Read more
Source§

impl<T, Z> OneIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: One + PartialEq,

Source§

fn all_one(&self) -> bool

Source§

fn any_one(&self) -> bool

Source§

impl<T> PartialOrdExtension for T
where T: PartialOrd,

Source§

fn max_partial(self, other: Self) -> Self
where Self: Sized,

Using PartialOrd operator, not component wise
Source§

fn min_partial(self, other: Self) -> Self
where Self: Sized,

Using PartialOrd operator, not component wise
Source§

fn clamp_partial(self, min: Self, max: Self) -> Self
where Self: Sized,

Using PartialOrd operator, not component wise
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<T> PositiveOrNegative for T
where T: Zero + PartialOrd,

Source§

impl<T> SplatCoord1 for T
where T: Copy,

Source§

fn splat1(self) -> Vector1<Self>

Source§

impl<T> SplatCoord2 for T
where T: Copy,

Source§

fn splat2(self) -> Vector2<Self>

Source§

impl<T> SplatCoord3 for T
where T: Copy,

Source§

fn splat3(self) -> Vector3<Self>

Source§

impl<T> SplatCoord4 for T
where T: Copy,

Source§

fn splat4(self) -> Vector4<Self>

Source§

impl<T> TakeHalf for T
where T: NumericIdentity,

Source§

fn take_half(self) -> T

Half the current value
Source§

impl<T> Three for T
where T: One + Add<Output = T>,

Source§

fn three() -> T

There will be a constant THREE later when const trait will be stable
Source§

fn is_three(&self) -> bool
where Self: PartialEq<Self>,

Source§

fn is_non_three(&self) -> bool
where Self: PartialEq<Self>,

Source§

impl<T> ToAngleComposite for T
where T: Map, <T as MapIntern>::Item: ToAngleComposite,

Source§

impl<C, T, const N: usize> ToArray<T, N> for C
where C: Into<[T; N]>,

Source§

impl<C, T> ToArray2<T> for C
where C: Into<[T; 2]>,

Source§

impl<S> ToBool for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToBool>::Output>>, <S as MapIntern>::Item: ToBool,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToBool>::Output>

Source§

fn to_bool(self) -> <S as ToBool>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_bool_range(self) -> <S as ToBool>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<T> ToDebug for T
where T: Debug,

Source§

impl<S> ToF32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToF32>::Output>>, <S as MapIntern>::Item: ToF32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToF32>::Output>

Source§

fn to_f32(self) -> <S as ToF32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_f32_range(self) -> <S as ToF32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToF64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToF64>::Output>>, <S as MapIntern>::Item: ToF64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToF64>::Output>

Source§

fn to_f64(self) -> <S as ToF64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_f64_range(self) -> <S as ToF64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToFloat for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToFloat>::Output>>, <S as MapIntern>::Item: ToFloat,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToFloat>::Output>

Source§

fn to_float(self) -> <S as ToFloat>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_float_range(self) -> <S as ToFloat>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI16 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI16>::Output>>, <S as MapIntern>::Item: ToI16,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI16>::Output>

Source§

fn to_i16(self) -> <S as ToI16>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i16_range(self) -> <S as ToI16>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI32>::Output>>, <S as MapIntern>::Item: ToI32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI32>::Output>

Source§

fn to_i32(self) -> <S as ToI32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i32_range(self) -> <S as ToI32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI64>::Output>>, <S as MapIntern>::Item: ToI64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI64>::Output>

Source§

fn to_i64(self) -> <S as ToI64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i64_range(self) -> <S as ToI64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToI8 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToI8>::Output>>, <S as MapIntern>::Item: ToI8,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToI8>::Output>

Source§

fn to_i8(self) -> <S as ToI8>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_i8_range(self) -> <S as ToI8>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToISize for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToISize>::Output>>, <S as MapIntern>::Item: ToISize,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToISize>::Output>

Source§

fn to_isize(self) -> <S as ToISize>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_isize_range(self) -> <S as ToISize>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToInt for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToInt>::Output>>, <S as MapIntern>::Item: ToInt,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToInt>::Output>

Source§

fn to_int(self) -> <S as ToInt>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_int_range(self) -> <S as ToInt>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
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> ToTimeComposite for T
where T: Map, <T as MapIntern>::Item: ToTimeComposite,

Source§

type Output = <T as Map>::WithType<<<T as MapIntern>::Item as ToTimeComposite>::Output>

Source§

fn ms(self) -> <T as ToTimeComposite>::Output

Source§

fn s(self) -> <T as ToTimeComposite>::Output

Source§

fn mins(self) -> <T as ToTimeComposite>::Output

With an s to avoid the confusion with the min function…
Source§

fn hour(self) -> <T as ToTimeComposite>::Output

Source§

fn day(self) -> <T as ToTimeComposite>::Output

Source§

impl<S> ToU16 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU16>::Output>>, <S as MapIntern>::Item: ToU16,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU16>::Output>

Source§

fn to_u16(self) -> <S as ToU16>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u16_range(self) -> <S as ToU16>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU32 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU32>::Output>>, <S as MapIntern>::Item: ToU32,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU32>::Output>

Source§

fn to_u32(self) -> <S as ToU32>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u32_range(self) -> <S as ToU32>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU64 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU64>::Output>>, <S as MapIntern>::Item: ToU64,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU64>::Output>

Source§

fn to_u64(self) -> <S as ToU64>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u64_range(self) -> <S as ToU64>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToU8 for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToU8>::Output>>, <S as MapIntern>::Item: ToU8,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToU8>::Output>

Source§

fn to_u8(self) -> <S as ToU8>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_u8_range(self) -> <S as ToU8>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToUInt for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToUInt>::Output>>, <S as MapIntern>::Item: ToUInt,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToUInt>::Output>

Source§

fn to_uint(self) -> <S as ToUInt>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_uint_range(self) -> <S as ToUInt>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
Source§

impl<S> ToUSize for S
where S: Map + CastInto<<S as Map>::WithType<<<S as MapIntern>::Item as ToUSize>::Output>>, <S as MapIntern>::Item: ToUSize,

Source§

type Output = <S as Map>::WithType<<<S as MapIntern>::Item as ToUSize>::Output>

Source§

fn to_usize(self) -> <S as ToUSize>::Output

Same semantics as the as keyword: 4f32 as u64, and the From trait, but generic friendly. Read more
Source§

fn to_usize_range(self) -> <S as ToUSize>::Output

Remap the value RangeDefault to the RangeDefault of the target type, in a generic friendly way, and similar to the From trait.
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<T> Two for T
where T: NumericIdentity,

Source§

fn two() -> T

There will be a constant TWO later when const trait will be stable
Source§

fn is_two(&self) -> bool
where Self: PartialEq<Self>,

Source§

fn is_non_two(&self) -> bool
where Self: PartialEq<Self>,

Source§

impl<T, Z> ZeroIter for T
where &'a T: for<'a> IntoIterator<Item = &'a Z>, Z: Zero + PartialEq,

Source§

impl<T> Additive for T
where T: Add<Output = T> + AddAssign + Sum + Sub<Output = T> + Copy + SubAssign + Zero,

Source§

impl<T> Arithmetic for T
where T: MulAssign + Product + Div<Output = T> + Additive + DivAssign + Rem<Output = T> + Mul<Output = T> + RemAssign,

Source§

impl<T> ArithmeticSigned for T
where T: Arithmetic + Neg<Output = T>,

Source§

impl<T> Async for T
where T: Send + Sync + 'static,

Source§

impl<'de, T> CfgDeserialize<'de> for T
where T: Deserialize<'de> + ?Sized,

Source§

impl<T> CfgSerialize for T
where T: Serialize + ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Has<T> for S
where S: HasRef<T> + HasMut<T>,

Source§

impl<T> Number for T

Source§

impl<T> NumberSigned for T

Source§

impl<T> Numeric for T
where T: Arithmetic + PartialEq + Debug + Min + Max + Clamp + Mix + Abs<Output = T>,

Source§

impl<T> NumericIdentity for T
where T: Numeric + One,

Source§

impl<T> NumericSigned for T

Source§

impl<T> NumericSignedIdentity for T
where T: NumericSigned + One,