Skip to main content

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 LEN: usize = 2usize

Source

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

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: RectangleOf<T>) -> RectangleOf<T>
where RectangleOf<T>: Max,

Max function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn min(self, other: RectangleOf<T>) -> RectangleOf<T>
where RectangleOf<T>: Min,

Min function in a component way

Can cause a panic for grid if the size mismatch

Source

pub fn abs(self) -> <RectangleOf<T> as Abs>::Output
where RectangleOf<T>: 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: RectangleOf<T>, coef: C) -> RectangleOf<T>
where RectangleOf<T>: 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: RectangleOf<T>, coef: C) -> RectangleOf<T>
where RectangleOf<T>: 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: RectangleOf<T>, max_val: RectangleOf<T>, ) -> RectangleOf<T>
where RectangleOf<T>: 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§

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<Output = T> + Add<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<Output = T> + Add<Output = T>,

Same as down_right()

Source

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

Source

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

Source

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

Same as up_right()

Source

pub fn top_left(&self) -> Vector<T, 2>
where T: One + Mul<Output = T> + Add<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>, ) -> RectangleOf<Vector<T, N>>

Source

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

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 = RectangleOf<Vector<T, N>>>

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

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: RectangleOf<Vector<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: RectangleOf<Vector<T, N>>, ) -> RectangleOf<Vector<T, N>>
where Vector<T, N>: Max + Min,

Source

pub fn intersect( self, other: RectangleOf<Vector<T, N>>, ) -> Option<RectangleOf<Vector<T, N>>>
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) -> RectangleOf<T>

assume the size is valid

Source

pub const fn new_sized(size: T) -> RectangleOf<T>
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>, ) -> RectangleOf<Vector<T, N>>

Trait Implementations§

Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> <RectangleOf<T> as Add<T>>::Output

Performs the + operation. Read more
Source§

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

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Add>::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: &RectangleOf<T>)

Performs the += operation. Read more
Source§

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

Source§

fn add_assign(&mut self, rhs: RectangleOf<T>)

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, Policy> AsMut<RectangleOf<T>> for RectangleOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn as_mut(&mut self) -> &mut RectangleOf<T>

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, Policy> AsRef<RectangleOf<T>> for RectangleOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn as_ref(&self) -> &RectangleOf<T>

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<(), Error>

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

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

Source§

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

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> <RectangleOf<T> as BitAnd<T>>::Output

Performs the & operation. Read more
Source§

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

Source§

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

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as BitAnd>::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: &RectangleOf<T>)

Performs the &= operation. Read more
Source§

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

Source§

fn bitand_assign(&mut self, rhs: RectangleOf<T>)

Performs the &= operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> <RectangleOf<T> as BitOr<T>>::Output

Performs the | operation. Read more
Source§

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

Source§

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

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as BitOr>::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: &RectangleOf<T>)

Performs the |= operation. Read more
Source§

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

Source§

fn bitor_assign(&mut self, rhs: RectangleOf<T>)

Performs the |= operation. Read more
Source§

impl<T> BitPattern for RectangleOf<T>
where T: BitPattern, [<T as BitPattern>::Bits; 2]: BitAnyPattern,

Source§

type Bits = [<T as BitPattern>::Bits; 2]

Source§

fn is_bit_pattern_valid(bits: &<RectangleOf<T> as BitPattern>::Bits) -> bool

Source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Source§

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

Source§

fn clone(&self) -> RectangleOf<T>

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, const N: usize> Crop<T, N> for RectangleOf<Vector<T, N>>
where T: Number,

Source§

fn crop( self, subrect: RectangleOf<Vector<T, N>>, ) -> Option<RectangleOf<Vector<T, N>>>

Crop the current rectangle to the given sub rectangle. Read more
Source§

unsafe fn crop_unchecked( self, subrect: RectangleOf<Vector<T, N>>, ) -> RectangleOf<Vector<T, N>>

Crop the current rectangle to the given sub rectangle. Read more
Source§

fn crop_intersect( self, subrect: RectangleOf<Vector<T, N>>, ) -> RectangleOf<Vector<T, N>>

Crop the current rectangle to the given sub rectangle. Read more
Source§

unsafe fn crop_margin_unchecked( self, margin_start: Vector<T, N>, margin_end: Vector<T, N>, ) -> RectangleOf<Vector<T, N>>

Source§

fn crop_or_panic(self, subrect: RectangleOf<Vector<T, N>>) -> Self

Crop the current rectangle to the given sub rectangle. Read more
Source§

fn crop_margin( self, margin_start: Vector<T, N>, margin_end: Vector<T, N>, ) -> Option<Self>

Source§

fn crop_margin_intersect( self, margin_start: Vector<T, N>, margin_end: Vector<T, N>, ) -> Self

Crop self by adding a margin to the start and the end of the current rectangle size. Read more
Source§

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

Source§

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

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

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

Source§

fn default() -> RectangleOf<T>

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<RectangleOf<T>, <D as Deserializer<'de>>::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<(), Error>

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

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

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> <RectangleOf<T> as Div<T>>::Output

Performs the / operation. Read more
Source§

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

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Div>::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: &RectangleOf<T>)

Performs the /= operation. Read more
Source§

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

Source§

fn div_assign(&mut self, rhs: RectangleOf<T>)

Performs the /= operation. Read more
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<T, Policy> From<RectangleOf<T>> for RectangleOfWithDefault<T, Policy>
where Policy: Constant<T>,

Source§

fn from(value: RectangleOf<T>) -> RectangleOfWithDefault<T, Policy>

Converts to this type from the input type.
Source§

impl<T, Policy> From<RectangleOfWithDefault<T, Policy>> for RectangleOf<T>
where Policy: Constant<T>,

Source§

fn from(value: RectangleOfWithDefault<T, Policy>) -> RectangleOf<T>

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<&<RectangleOf<T> as Get<Idx>>::Output>

Returns a reference to the value.
Source§

unsafe fn get_unchecked( &self, index: Idx, ) -> &<RectangleOf<T> as Get<Idx>>::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§

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

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 <RectangleOf<T> as Get<Idx>>::Output; N], GetDisjointMutError>

Source§

fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut <RectangleOf<T> as Get<Idx>>::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 <RectangleOf<T> as Get<Idx>>::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 <RectangleOf<T> as Get<Idx>>::Output>

Returns a mutable reference to the value.
Source§

unsafe fn get_unchecked_mut( &mut self, index: Idx, ) -> &mut <RectangleOf<T> as Get<Idx>>::Output

Returns a mutable reference to the value.
Source§

fn get_mut_or_panic(&mut self, index: 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, const N: usize> GetPosition<T, N> for RectangleOf<Vector<T, N>>
where T: Number,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Same as .size_x()
Source§

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

Same as .size_y()
Source§

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

Same as .size_z()
Source§

fn area(&self) -> T

Source§

fn area_usize(&self) -> usize
where T: Integer,

Source§

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

Source§

const HALF: RectangleOf<T>

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) -> &<RectangleOf<T> as Index<Idx>>::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 <RectangleOf<T> as Index<Idx>>::Output

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

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

Source§

const INFINITY: RectangleOf<T>

Source§

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

Source§

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

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) -> <&'a RectangleOf<T> as IntoIterator>::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) -> <&'a mut RectangleOf<T> as IntoIterator>::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) -> <RectangleOf<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<Idx, const N: usize> IterIndex<Idx, N> for RectangleOf<Vector<Idx, N>>
where Idx: Integer,

Source§

type IterIndex = RectangleIter<Idx, N>

Source§

fn iter_index( &self, ) -> <RectangleOf<Vector<Idx, N>> as IterIndex<Idx, N>>::IterIndex

Iter over all Point in self. Read more
Source§

impl<T> Length for RectangleOf<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

True if the container contains 0 elements. Read more
Source§

fn is_not_empty(&self) -> bool

True if the container contains at least one element. Will always be different than is_empty(). Read more
Source§

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

Source§

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

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<(), Error>

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) -> <RectangleOf<T> as Map>::WithType<T2>
where F: FnMut(<RectangleOf<T> as MapIntern>::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) -> RectangleOf<T>
where F: FnMut(<RectangleOf<T> as MapIntern>::Item) -> <RectangleOf<T> as MapIntern>::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: RectangleOf<T>, f: F) -> RectangleOf<T>

Combine self and other elementwise with f.
Source§

impl<T> MapWith for RectangleOf<T>

Source§

fn map_with<R, Item2, F>( self, other: <RectangleOf<T> as Map>::WithType<Item2>, f: F, ) -> <RectangleOf<T> as Map>::WithType<R>
where F: FnMut(<RectangleOf<T> as MapIntern>::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: RectangleOf<T>

Source§

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

Source§

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

Source§

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

Source§

const MIN: RectangleOf<T>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

const MINUS_ONE: RectangleOf<T>

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 + Copy,

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> <RectangleOf<T> as Mul<T>>::Output

Performs the * operation. Read more
Source§

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

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Mul>::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: &RectangleOf<T>)

Performs the *= operation. Read more
Source§

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

Source§

fn mul_assign(&mut self, rhs: RectangleOf<T>)

Performs the *= operation. Read more
Source§

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

Source§

const NAN: RectangleOf<T>

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) -> <RectangleOf<T> as Neg>::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) -> <RectangleOf<T> as Not>::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<(), Error>

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

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

Source§

const ONE: RectangleOf<T>

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: &RectangleOf<T>) -> 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: &RectangleOf<T>) -> 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: &RectangleOf<T>) -> 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<(), Error>

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

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

Source§

fn product<I>(iter: I) -> RectangleOf<T>
where I: Iterator<Item = RectangleOf<T>>,

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

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

Source§

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

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> <RectangleOf<T> as Rem<T>>::Output

Performs the % operation. Read more
Source§

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

Source§

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

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Rem>::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: &RectangleOf<T>)

Performs the %= operation. Read more
Source§

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

Source§

fn rem_assign(&mut self, rhs: RectangleOf<T>)

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 as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

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

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

Source§

fn set_pos(&mut self, pos: Vector<T, N>) -> &mut RectangleOf<Vector<T, N>>

Source§

fn set_x(&mut self, x: T) -> &mut Self
where Vector<T, N>: HaveX<T>, Self: GetPosition<T, N>,

Source§

fn set_y(&mut self, y: T) -> &mut Self
where Vector<T, N>: HaveY<T>, Self: GetPosition<T, N>,

Source§

fn set_z(&mut self, z: T) -> &mut Self
where Vector<T, N>: HaveZ<T>, Self: GetPosition<T, N>,

Source§

fn set_w(&mut self, w: T) -> &mut Self
where Vector<T, N>: HaveW<T>, Self: GetPosition<T, N>,

Source§

fn with_pos(self, pos: Vector<T, N>) -> Self
where Self: Sized + GetPosition<T, N>,

Source§

fn with_x(self, x: T) -> Self
where Vector<T, N>: HaveX<T>, Self: Sized + GetPosition<T, N>,

Source§

fn with_y(self, y: T) -> Self
where Vector<T, N>: HaveY<T>, Self: Sized + GetPosition<T, N>,

Source§

fn with_z(self, z: T) -> Self
where Vector<T, N>: HaveZ<T>, Self: Sized + GetPosition<T, N>,

Source§

fn with_w(self, w: T) -> Self
where Vector<T, N>: HaveW<T>, Self: Sized + GetPosition<T, N>,

Source§

fn move_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
where Vector<T, N>: Add<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_neg_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
where Vector<T, N>: Sub<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_x(&mut self, x: T) -> &mut Self
where Vector<T, N>: HaveX<T> + Zero + Add<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_y(&mut self, y: T) -> &mut Self
where Vector<T, N>: HaveY<T> + Zero + Add<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_z(&mut self, z: T) -> &mut Self
where Vector<T, N>: HaveZ<T> + Zero + Add<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_w(&mut self, w: T) -> &mut Self
where Vector<T, N>: HaveW<T> + Zero + Add<Output = Vector<T, N>>, Self: GetPosition<T, N>,

Source§

fn move_neg_x(&mut self, x: T) -> &mut Self
where Vector<T, N>: HaveX<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: GetPosition<T, N>,

Source§

fn move_neg_y(&mut self, y: T) -> &mut Self
where Vector<T, N>: HaveY<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: GetPosition<T, N>,

Source§

fn move_neg_z(&mut self, z: T) -> &mut Self
where Vector<T, N>: HaveZ<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: GetPosition<T, N>,

Source§

fn move_neg_w(&mut self, w: T) -> &mut Self
where Vector<T, N>: HaveW<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: GetPosition<T, N>,

Source§

fn moved_by(self, v: impl Into<Vector<T, N>>) -> Self
where Vector<T, N>: Add<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_neg_by(self, v: impl Into<Vector<T, N>>) -> Self
where Vector<T, N>: Sub<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_x(self, x: T) -> Self
where Vector<T, N>: HaveX<T> + Zero + Add<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_y(self, y: T) -> Self
where Vector<T, N>: HaveY<T> + Zero + Add<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_z(self, z: T) -> Self
where Vector<T, N>: HaveZ<T> + Zero + Add<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_w(self, w: T) -> Self
where Vector<T, N>: HaveW<T> + Zero + Add<Output = Vector<T, N>>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_neg_x(self, x: T) -> Self
where Vector<T, N>: HaveX<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_neg_y(self, y: T) -> Self
where Vector<T, N>: HaveY<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_neg_z(self, z: T) -> Self
where Vector<T, N>: HaveZ<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: Sized + GetPosition<T, N>,

Source§

fn moved_neg_w(self, w: T) -> Self
where Vector<T, N>: HaveW<T> + Zero + Add<Output = Vector<T, N>>, T: Neg<Output = T>, Self: Sized + GetPosition<T, N>,

Source§

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

Source§

fn set_size(&mut self, size: Vector<T, N>) -> &mut RectangleOf<Vector<T, N>>

Source§

fn resize(&mut self, size: Vector<T, N>) -> &mut Self

Source§

fn set_size_x(&mut self, x: T) -> &mut Self
where Vector<T, N>: HaveX<T>,

Source§

fn set_size_y(&mut self, y: T) -> &mut Self
where Vector<T, N>: HaveY<T>,

Source§

fn set_size_z(&mut self, z: T) -> &mut Self
where Vector<T, N>: HaveZ<T>,

Source§

fn set_size_w(&mut self, w: T) -> &mut Self
where Vector<T, N>: HaveW<T>,

Source§

fn with_size(self, size: Vector<T, N>) -> Self
where Self: Sized,

Source§

fn with_size_x(self, x: T) -> Self
where Vector<T, N>: HaveX<T>, Self: Sized,

Source§

fn with_size_y(self, y: T) -> Self
where Vector<T, N>: HaveY<T>, Self: Sized,

Source§

fn with_size_z(self, z: T) -> Self
where Vector<T, N>: HaveZ<T>, Self: Sized,

Source§

fn with_size_w(self, w: T) -> Self
where Vector<T, N>: HaveW<T>, Self: Sized,

Source§

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

Source§

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

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

fn shl(self, rhs: T) -> <RectangleOf<T> as Shl<T>>::Output

Performs the << operation. Read more
Source§

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

Source§

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

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

fn shl(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Shl>::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: &RectangleOf<T>)

Performs the <<= operation. Read more
Source§

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

Source§

fn shl_assign(&mut self, rhs: RectangleOf<T>)

Performs the <<= operation. Read more
Source§

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

Source§

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

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

fn shr(self, rhs: T) -> <RectangleOf<T> as Shr<T>>::Output

Performs the >> operation. Read more
Source§

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

Source§

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

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

fn shr(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Shr>::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: &RectangleOf<T>)

Performs the >>= operation. Read more
Source§

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

Source§

fn shr_assign(&mut self, rhs: RectangleOf<T>)

Performs the >>= operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> <RectangleOf<T> as Sub<T>>::Output

Performs the - operation. Read more
Source§

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

Source§

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

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: RectangleOf<T>) -> <RectangleOf<T> as Sub>::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: &RectangleOf<T>)

Performs the -= operation. Read more
Source§

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

Source§

fn sub_assign(&mut self, rhs: RectangleOf<T>)

Performs the -= operation. Read more
Source§

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

Source§

fn sum<I>(iter: I) -> RectangleOf<T>
where I: Iterator<Item = RectangleOf<T>>,

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<&<RectangleOf<T> as Get<Idx>>::Output, <RectangleOf<T> as TryGet<Idx>>::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 <RectangleOf<T> as Get<Idx>>::Output, <RectangleOf<T> as TryGet<Idx>>::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<(), Error>

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<(), Error>

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

impl<T, Policy> WithDefault<T, Policy> for RectangleOf<T>
where RectangleOf<T>: CfgSerialize + for<'de> CfgDeserialize<'de>, T: CfgSerialize + for<'de> CfgDeserialize<'de>, Policy: Constant<T>,

Source§

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

Source§

const ZERO: RectangleOf<T>

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

Source§

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

Source§

impl<T> Collection for RectangleOf<T>

Source§

impl<T> CollectionBijective for RectangleOf<T>

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

§

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<S, T, const N: usize> ArrayToColor<T, N> for S
where S: Array<T, N>,

Source§

fn to_rgba(self) -> RgbaOf<T>
where T: Default,

Source§

fn to_hlsa(self) -> HslaOf<T>
where T: Default,

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> BitZeroed for T
where T: BitZero,

Source§

fn zeroed() -> Self

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> CollectTo<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, K, V, S> CollectToGenMap<K, V, S> for I
where I: IntoIterator<Item = (K, V)>, K: Clone,

Source§

fn to_genmap(self) -> GenMapOf<K, V, u32, S>
where GenMapOf<K, V, u32, S>: WithCapacity + Reserve, <GenMapOf<K, V, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<V>>,

Source§

impl<I, K, S> CollectToGenSet<K, S> for I
where I: IntoIterator<Item = K>, K: Clone,

Source§

fn to_genset(self) -> GenSetOf<K, u32, S>
where GenSetOf<K, u32, S>: WithCapacity + Reserve, <GenSetOf<K, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<K>> + for<'a> Remove<&'a K, Output = GenIDOf<K>>,

Source§

impl<I, T> CollectToGenVec<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_genvec(self) -> GenSeq<T>

Source§

impl<I, T1, T2> CollectToMap<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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> FromJson for T
where T: for<'de> Deserialize<'de>,

Source§

fn from_json_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_json_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_json(json: &str) -> Result<Self, EncodeError>

Source§

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

Source§

fn from_ron_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_ron_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_ron(ron: &str) -> Result<Self, EncodeError>

Source§

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

Source§

fn from_tmp_bin_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_tmp_bin_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

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

Source§

fn from_xml_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_xml_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_xml(xml: &str) -> Result<Self, EncodeError>

Source§

impl<S, T, const N: usize> GetRectangle<T, N> for S
where S: GetPosition<T, N> + GetSize<T, N>, T: Number,

Source§

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

Source§

fn is_outside(&self, pos: Vector<T, N>) -> bool

Source§

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

Source§

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

Source§

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

same as .begin()
Source§

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

same as .end()
Source§

fn rect(&self) -> RectangleOf<Vector<T, N>>

Source§

fn iter_x(&self) -> Range<T>
where Vector<T, N>: HaveX<T>, Range<T>: IntoIterator,

Source§

fn iter_y(&self) -> Range<T>
where Vector<T, N>: HaveY<T>, Range<T>: IntoIterator,

Source§

fn iter_z(&self) -> Range<T>
where Vector<T, N>: HaveZ<T>, Range<T>: IntoIterator,

Source§

fn iter_w(&self) -> Range<T>
where Vector<T, N>: HaveW<T>, Range<T>: IntoIterator,

Source§

fn is_inside_x(&self, x: T) -> bool
where Vector<T, N>: HaveX<T>,

Source§

fn is_inside_y(&self, y: T) -> bool
where Vector<T, N>: HaveY<T>,

Source§

fn is_inside_z(&self, z: T) -> bool
where Vector<T, N>: HaveZ<T>,

Source§

fn is_inside_w(&self, w: T) -> bool
where Vector<T, N>: HaveW<T>,

Source§

fn is_outside_x(&self, x: T) -> bool
where Vector<T, N>: HaveX<T>,

Source§

fn is_outside_y(&self, y: T) -> bool
where Vector<T, N>: HaveY<T>,

Source§

fn is_outside_z(&self, z: T) -> bool
where Vector<T, N>: HaveZ<T>,

Source§

fn is_outside_w(&self, w: T) -> bool
where Vector<T, N>: HaveW<T>,

Source§

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

Source§

fn retrieve(&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_ref(&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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. 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§

impl<Item, T> IterPredicate<Item> for T
where T: IntoIterator<Item = Item>,

Source§

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

Source§

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

Source§

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

Source§

fn all_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, 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) -> Vector<Self, 1>

Source§

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

Source§

fn splat2(self) -> Vector<Self, 2>

Source§

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

Source§

fn splat3(self) -> Vector<Self, 3>

Source§

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

Source§

fn splat4(self) -> Vector<Self, 4>

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,

Source§

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

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> ToJson for T
where T: Serialize,

Source§

fn to_json(&self) -> Result<String, EncodeError>

Source§

fn to_json_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

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> ToRon for T
where T: Serialize,

Source§

fn to_ron(&self) -> Result<String, EncodeError>

Source§

fn to_ron_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

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

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 millis(self) -> <T as ToTimeComposite>::Output

Creates a new Time from the specified number of whole milliseconds.
Source§

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

Creates a new Time from the specified number of whole seconds.
Source§

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

Creates a new Time from the specified number of whole minutes.
Source§

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

Creates a new Time from the specified number of whole hours.
Source§

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

Creates a new Time from the specified number of whole days.
Source§

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

Source§

fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>

Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§

fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Intended for short-term storage of data in a binary format, such as during data transfer. Read more
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> ToXml for T
where T: Serialize,

Source§

fn to_xml(&self) -> Result<String, EncodeError>

Source§

fn to_xml_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

impl<T, S> TryAsRef<T> for S
where S: AsRef<T>,

Source§

type Error = Never

Source§

fn try_as_ref(&self) -> Result<&T, <S as TryAsRef<T>>::Error>

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,

Source§

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

Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
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<T> AsyncDebug for T
where T: Async + Debug,

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<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

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,

Source§

impl<S, T, const N: usize> SetRectangle<T, N> for S
where S: GetRectangle<T, N> + GetSize<T, N> + SetPosition<T, N> + SetSize<T, N>, T: Number,

Source§

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

Source§

impl<T> WasmNotSendSync for T

Source§

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