Struct CoordPair

Source
pub struct CoordPair<C> {
    pub y: C,
    pub x: C,
}

Fields§

§y: C§x: C

Implementations§

Source§

impl<C> CoordPair<C>

Source

pub fn with_order(first: C, second: C) -> Self

Source

pub fn from_axes<F>(generator: F) -> Self
where F: FnMut(Axis) -> C,

Source

pub fn try_from_axes<F, E>(generator: F) -> Result<Self, E>
where F: FnMut(Axis) -> Result<C, E>,

Source

pub fn into_order(self) -> (C, C)

Source

pub fn as_ref(&self) -> CoordPair<&C>

Source

pub fn as_mut(&mut self) -> CoordPair<&mut C>

Source

pub fn map<F, C0>(self, mapper: F) -> CoordPair<C0>
where F: FnMut(C) -> C0,

Source

pub fn try_map<F, C0, E>(self, mapper: F) -> Result<CoordPair<C0>, E>
where F: FnMut(C) -> Result<C0, E>,

Source

pub fn map_with_axes<F, C0>(self, mapper: F) -> CoordPair<C0>
where F: FnMut(C, Axis) -> C0,

Source

pub fn try_map_with_axes<F, C0, E>(self, mapper: F) -> Result<CoordPair<C0>, E>
where F: FnMut(C, Axis) -> Result<C0, E>,

Source

pub fn shift(self) -> Self

Source

pub fn shift_rev(self) -> Self

Source

pub fn shift_in_place(&mut self)

Source

pub fn shift_rev_in_place(&mut self)

Source

pub fn shift_to(self, axis: Axis) -> Self

Source

pub fn shift_in_place_to(&mut self, axis: Axis)

Source

pub fn shift_rev_to(self, axis: Axis) -> Self

Source

pub fn shift_rev_in_place_to(&mut self, axis: Axis)

Source

pub fn zip2<C0>(self, other: CoordPair<C0>) -> CoordPair<(C, C0)>

Source

pub fn zip2_with<F, C0, C1>( self, other: CoordPair<C0>, zipper: F, ) -> CoordPair<C1>
where F: FnMut(C, C0) -> C1,

Source

pub fn zip2_with_axes<F, C0, C1>( self, other: CoordPair<C0>, zipper: F, ) -> CoordPair<C1>
where F: FnMut(C, C0, Axis) -> C1,

Source

pub fn try_zip2_with<F, C0, C1, E>( self, other: CoordPair<C0>, zipper: F, ) -> Result<CoordPair<C1>, E>
where F: FnMut(C, C0) -> Result<C1, E>,

Source

pub fn try_zip2_with_axes<F, C0, C1, E>( self, other: CoordPair<C0>, zipper: F, ) -> Result<CoordPair<C1>, E>
where F: FnMut(C, C0, Axis) -> Result<C1, E>,

Source

pub fn zip3<C0, C1>( self, other: CoordPair<C0>, another: CoordPair<C1>, ) -> CoordPair<(C, C0, C1)>

Source

pub fn zip3_with<F, C0, C1, C2>( self, other: CoordPair<C0>, another: CoordPair<C1>, zipper: F, ) -> CoordPair<C2>
where F: FnMut(C, C0, C1) -> C2,

Source

pub fn zip3_with_axes<F, C0, C1, C2>( self, other: CoordPair<C0>, another: CoordPair<C1>, zipper: F, ) -> CoordPair<C2>
where F: FnMut(C, C0, C1, Axis) -> C2,

Source

pub fn try_zip3_with<F, C0, C1, C2, E>( self, other: CoordPair<C0>, another: CoordPair<C1>, zipper: F, ) -> Result<CoordPair<C2>, E>
where F: FnMut(C, C0, C1) -> Result<C2, E>,

Source

pub fn try_zip3_with_axes<F, C0, C1, C2, E>( self, other: CoordPair<C0>, another: CoordPair<C1>, zipper: F, ) -> Result<CoordPair<C2>, E>
where F: FnMut(C, C0, C1, Axis) -> Result<C2, E>,

Source

pub fn extract(self, axis: Axis) -> C

Source

pub fn all<F>(self, predicate: F) -> bool
where F: FnMut(C) -> bool,

Source

pub fn any<F>(self, predicate: F) -> bool
where F: FnMut(C) -> bool,

Source

pub fn checked_add_to(&self, other: &C) -> Option<Self>
where C: CheckedAdd,

Source

pub fn checked_sub_except(&self, other: &C) -> Option<Self>
where C: CheckedSub,

Source

pub fn checked_sub_from(&self, other: &C) -> Option<Self>
where C: CheckedSub,

Source

pub fn checked_mul_scalar(&self, other: &C) -> Option<Self>
where C: CheckedMul,

Source

pub fn checked_div_by(&self, other: &C) -> Option<Self>
where C: CheckedDiv,

Source

pub fn checked_div_on(&self, other: &C) -> Option<Self>
where C: CheckedDiv,

Source

pub fn checked_rem_by(&self, other: &C) -> Option<Self>
where C: CheckedRem,

Source

pub fn checked_rem_on(&self, other: &C) -> Option<Self>
where C: CheckedRem,

Source

pub fn saturating_add_to(&self, other: &C) -> Self
where C: SaturatingAdd,

Source

pub fn saturating_sub_except(&self, other: &C) -> Self
where C: SaturatingSub,

Source

pub fn saturating_sub_from(&self, other: &C) -> Self
where C: SaturatingSub,

Source

pub fn saturating_mul_scalar(&self, other: &C) -> Self
where C: SaturatingMul,

Source

pub fn div_floor_by(&self, divisor: &C) -> Self
where C: Integer,

Source

pub fn div_ceil_by(&self, divisor: &C) -> Self
where C: Integer,

Source

pub fn div_floor_on(&self, dividend: &C) -> Self
where C: Integer,

Source

pub fn div_ceil_on(&self, dividend: &C) -> Self
where C: Integer,

Source

pub fn div_floor(&self, other: &Self) -> Self
where C: Integer,

Source

pub fn div_ceil(&self, other: &Self) -> Self
where C: Integer,

Source

pub fn move_unit(self, direction: Direction) -> Self
where C: Add<Output = C> + Sub<Output = C> + One,

Source

pub fn checked_move_unit(&self, direction: Direction) -> Option<Self>
where C: CheckedAdd + CheckedSub + One + Clone,

Source

pub fn saturating_move_unit(&self, direction: Direction) -> Self

Source

pub fn move_by(self, vector: DirectionVec<C>) -> Self
where C: Add<Output = C> + Sub<Output = C>,

Source

pub fn checked_move_by(&self, vector: DirectionVec<&C>) -> Option<Self>

Source

pub fn saturating_move_by(&self, vector: DirectionVec<&C>) -> Self

Source

pub fn as_rect_size(self, top_left: Self) -> Rect<C>

Source

pub fn as_rect_top_left(self, size: Self) -> Rect<C>

Source

pub fn direction_to(self, other: Self) -> Option<DirectionVec<C>>
where C: PartialOrd + Sub<Output = C>,

Source

pub fn direction_from(self, other: Self) -> Option<DirectionVec<C>>
where C: PartialOrd + Sub<Output = C>,

Source§

impl<'a, C> CoordPair<&'a C>

Source

pub fn copied(self) -> CoordPair<C>
where C: Copy,

Source

pub fn cloned(self) -> CoordPair<C>
where C: Clone,

Source

pub fn checked_add_by_ref(self, other: Self) -> Option<CoordPair<C>>
where C: CheckedAdd,

Source

pub fn checked_add_by_ref_to(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedAdd,

Source

pub fn checked_sub_by_ref(self, other: Self) -> Option<CoordPair<C>>
where C: CheckedSub,

Source

pub fn checked_sub_by_ref_except(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedSub,

Source

pub fn checked_sub_by_ref_from(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedSub,

Source

pub fn checked_mul_by_ref(self, other: Self) -> Option<CoordPair<C>>
where C: CheckedMul,

Source

pub fn checked_mul_by_ref_scalar(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedMul,

Source

pub fn checked_div_by_ref(self, other: Self) -> Option<CoordPair<C>>
where C: CheckedDiv,

Source

pub fn checked_div_by_ref_by(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedDiv,

Source

pub fn checked_div_by_ref_on(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedDiv,

Source

pub fn checked_rem_by_ref(self, other: Self) -> Option<CoordPair<C>>
where C: CheckedRem,

Source

pub fn checked_rem_by_ref_by(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedRem,

Source

pub fn checked_rem_by_ref_on(self, other: &C) -> Option<CoordPair<C>>
where C: CheckedRem,

Source

pub fn saturating_add_by_ref(self, other: Self) -> CoordPair<C>
where C: SaturatingAdd,

Source

pub fn saturating_add_by_ref_to(self, other: &C) -> CoordPair<C>
where C: SaturatingAdd,

Source

pub fn saturating_sub_by_ref(self, other: Self) -> CoordPair<C>
where C: SaturatingSub,

Source

pub fn saturating_sub_by_ref_except(self, other: &C) -> CoordPair<C>
where C: SaturatingSub,

Source

pub fn saturating_sub_by_ref_from(self, other: &C) -> CoordPair<C>
where C: SaturatingSub,

Source

pub fn saturating_mul_by_ref(self, other: Self) -> CoordPair<C>
where C: SaturatingMul,

Source

pub fn saturating_mul_by_ref_scalar(self, other: &C) -> CoordPair<C>
where C: SaturatingMul,

Source

pub fn div_floor_by_ref_by(self, divisor: &C) -> CoordPair<C>
where C: Integer,

Source

pub fn div_ceil_by_ref_by(self, divisor: &C) -> CoordPair<C>
where C: Integer,

Source

pub fn div_floor_by_ref_on(self, dividend: &C) -> CoordPair<C>
where C: Integer,

Source

pub fn div_ceil_by_ref_on(self, dividend: &C) -> CoordPair<C>
where C: Integer,

Source

pub fn div_floor_by_ref(self, other: Self) -> CoordPair<C>
where C: Integer,

Source

pub fn div_ceil_by_ref(self, other: Self) -> CoordPair<C>
where C: Integer,

Source

pub fn checked_move_unit_by_ref( self, direction: Direction, ) -> Option<CoordPair<C>>
where C: CheckedAdd + CheckedSub + One + Clone,

Source

pub fn saturating_move_unit_by_ref(self, direction: Direction) -> CoordPair<C>

Source

pub fn checked_move_by_ref_by( self, vector: DirectionVec<&C>, ) -> Option<CoordPair<C>>

Source

pub fn saturating_move_by_ref_by(self, vector: DirectionVec<&C>) -> CoordPair<C>

Source§

impl<'a, C> CoordPair<&'a mut C>

Source

pub fn copied(self) -> CoordPair<C>
where C: Copy,

Source

pub fn cloned(self) -> CoordPair<C>
where C: Clone,

Source

pub fn share(self) -> CoordPair<&'a C>

Source§

impl<C> CoordPair<Option<C>>

Source

pub fn transpose(self) -> Option<CoordPair<C>>

Source

pub fn from_transposed(transposed: Option<CoordPair<C>>) -> Self

Source§

impl<C, E> CoordPair<Result<C, E>>

Source

pub fn transpose(self) -> Result<CoordPair<C>, E>

Source

pub fn from_transposed(transposed: Result<CoordPair<C>, E>) -> Self
where E: Clone,

Trait Implementations§

Source§

impl<C> Add<C> for CoordPair<C>
where C: Add + Clone,

Source§

type Output = CoordPair<<C as Add>::Output>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<C> Add for CoordPair<C>
where C: Add,

Source§

type Output = CoordPair<<C 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<C> AddAssign<C> for CoordPair<C>
where C: AddAssign + Clone,

Source§

fn add_assign(&mut self, rhs: C)

Performs the += operation. Read more
Source§

impl<C> AddAssign for CoordPair<C>
where C: AddAssign,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<C> CheckedAdd for CoordPair<C>
where C: CheckedAdd,

Source§

fn checked_add(&self, other: &Self) -> Option<Self>

Adds two numbers, checking for overflow. If overflow happens, None is returned.
Source§

impl<C> CheckedDiv for CoordPair<C>
where C: CheckedDiv,

Source§

fn checked_div(&self, other: &Self) -> Option<Self>

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned.
Source§

impl<C> CheckedMul for CoordPair<C>
where C: CheckedMul,

Source§

fn checked_mul(&self, other: &Self) -> Option<Self>

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned.
Source§

impl<C> CheckedRem for CoordPair<C>
where C: CheckedRem,

Source§

fn checked_rem(&self, other: &Self) -> Option<Self>

Finds the remainder of dividing two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more
Source§

impl<C> CheckedSub for CoordPair<C>
where C: CheckedSub,

Source§

fn checked_sub(&self, other: &Self) -> Option<Self>

Subtracts two numbers, checking for underflow. If underflow happens, None is returned.
Source§

impl<C: Clone> Clone for CoordPair<C>

Source§

fn clone(&self) -> CoordPair<C>

Returns a copy 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<C: Debug> Debug for CoordPair<C>

Source§

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

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

impl<C: Default> Default for CoordPair<C>

Source§

fn default() -> CoordPair<C>

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

impl<'de, C> Deserialize<'de> for CoordPair<C>
where C: 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<C> Display for CoordPair<C>
where C: Display,

Source§

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

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

impl<C> Div<C> for CoordPair<C>
where C: Div + Clone,

Source§

type Output = CoordPair<<C as Div>::Output>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<C> Div for CoordPair<C>
where C: Div,

Source§

type Output = CoordPair<<C 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<C> DivAssign<C> for CoordPair<C>
where C: DivAssign + Clone,

Source§

fn div_assign(&mut self, rhs: C)

Performs the /= operation. Read more
Source§

impl<C> DivAssign for CoordPair<C>
where C: DivAssign,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<C: Hash> Hash for CoordPair<C>

Source§

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

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<C> Index<Axis> for CoordPair<C>

Source§

type Output = C

The returned type after indexing.
Source§

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

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

impl<T> Index<CoordPair<Order>> for DiagonalMap<T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: CoordPair<Order>) -> &Self::Output

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

impl<C> IndexMut<Axis> for CoordPair<C>

Source§

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

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

impl<T> IndexMut<CoordPair<Order>> for DiagonalMap<T>

Source§

fn index_mut(&mut self, index: CoordPair<Order>) -> &mut Self::Output

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

impl<C> Mul<C> for CoordPair<C>
where C: Mul + Clone,

Source§

type Output = CoordPair<<C as Mul>::Output>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<C> Mul for CoordPair<C>
where C: Mul,

Source§

type Output = CoordPair<<C 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<C> MulAssign<C> for CoordPair<C>
where C: MulAssign + Clone,

Source§

fn mul_assign(&mut self, rhs: C)

Performs the *= operation. Read more
Source§

impl<C> MulAssign for CoordPair<C>
where C: MulAssign,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<C> Neg for CoordPair<C>
where C: Neg,

Source§

type Output = CoordPair<<C as Neg>::Output>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<C> One for CoordPair<C>
where C: One,

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

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

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl<C: Ord> Ord for CoordPair<C>

Source§

fn cmp(&self, other: &CoordPair<C>) -> 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<C: PartialEq> PartialEq for CoordPair<C>

Source§

fn eq(&self, other: &CoordPair<C>) -> 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<C: PartialOrd> PartialOrd for CoordPair<C>

Source§

fn partial_cmp(&self, other: &CoordPair<C>) -> 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<C> Rem<C> for CoordPair<C>
where C: Rem + Clone,

Source§

type Output = CoordPair<<C as Rem>::Output>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl<C> Rem for CoordPair<C>
where C: Rem,

Source§

type Output = CoordPair<<C 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<C> RemAssign<C> for CoordPair<C>
where C: RemAssign + Clone,

Source§

fn rem_assign(&mut self, rhs: C)

Performs the %= operation. Read more
Source§

impl<C> RemAssign for CoordPair<C>
where C: RemAssign,

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<C> SaturatingAdd for CoordPair<C>
where C: SaturatingAdd,

Source§

fn saturating_add(&self, other: &Self) -> Self

Saturating addition. Computes self + other, saturating at the relevant high or low boundary of the type.
Source§

impl<C> SaturatingMul for CoordPair<C>
where C: SaturatingMul,

Source§

fn saturating_mul(&self, other: &Self) -> Self

Saturating multiplication. Computes self * other, saturating at the relevant high or low boundary of the type.
Source§

impl<C> SaturatingSub for CoordPair<C>
where C: SaturatingSub,

Source§

fn saturating_sub(&self, other: &Self) -> Self

Saturating subtraction. Computes self - other, saturating at the relevant high or low boundary of the type.
Source§

impl<C> Serialize for CoordPair<C>
where C: Serialize,

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<C> Sub<C> for CoordPair<C>
where C: Sub + Clone,

Source§

type Output = CoordPair<<C as Sub>::Output>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<C> Sub for CoordPair<C>
where C: Sub,

Source§

type Output = CoordPair<<C 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<C> SubAssign<C> for CoordPair<C>
where C: SubAssign + Clone,

Source§

fn sub_assign(&mut self, rhs: C)

Performs the -= operation. Read more
Source§

impl<C> SubAssign for CoordPair<C>
where C: SubAssign,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<C> Zero for CoordPair<C>
where C: Zero + PartialEq,

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<C: Copy> Copy for CoordPair<C>

Source§

impl<C: Eq> Eq for CoordPair<C>

Source§

impl<C> StructuralPartialEq for CoordPair<C>

Auto Trait Implementations§

§

impl<C> Freeze for CoordPair<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for CoordPair<C>
where C: RefUnwindSafe,

§

impl<C> Send for CoordPair<C>
where C: Send,

§

impl<C> Sync for CoordPair<C>
where C: Sync,

§

impl<C> Unpin for CoordPair<C>
where C: Unpin,

§

impl<C> UnwindSafe for CoordPair<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

fn to_string(&self) -> String

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

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<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>,