Trait enso_flexer::prelude::Add 1.0.0[−][src]
Expand description
The addition operator +
.
Note that Rhs
is Self
by default, but this is not mandatory. For
example, std::time::SystemTime
implements Add<Duration>
, which permits
operations of the form SystemTime = SystemTime + Duration
.
Examples
Add
able points
use std::ops::Add; #[derive(Debug, Copy, Clone, PartialEq)] struct Point { x: i32, y: i32, } impl Add for Point { type Output = Self; fn add(self, other: Self) -> Self { Self { x: self.x + other.x, y: self.y + other.y, } } } assert_eq!(Point { x: 1, y: 0 } + Point { x: 2, y: 3 }, Point { x: 3, y: 3 });
Implementing Add
with generics
Here is an example of the same Point
struct implementing the Add
trait
using generics.
use std::ops::Add; #[derive(Debug, Copy, Clone, PartialEq)] struct Point<T> { x: T, y: T, } // Notice that the implementation uses the associated type `Output`. impl<T: Add<Output = T>> Add for Point<T> { type Output = Self; fn add(self, other: Self) -> Self::Output { Self { x: self.x + other.x, y: self.y + other.y, } } } assert_eq!(Point { x: 1, y: 0 } + Point { x: 2, y: 3 }, Point { x: 3, y: 3 });
Associated Types
Loading content...Required methods
Loading content...Implementations on Foreign Types
impl Add<Duration> for SystemTime
[src]
impl Add<Duration> for SystemTime
[src]pub fn add(self, dur: Duration) -> SystemTime
[src]
pub fn add(self, dur: Duration) -> SystemTime
[src]Panics
This function may panic if the resulting point in time cannot be represented by the
underlying data structure. See SystemTime::checked_add
for a version without panic.
type Output = SystemTime
impl<'_> Add<&'_ str> for String
[src]
impl<'_> Add<&'_ str> for String
[src]Implements the +
operator for concatenating two strings.
This consumes the String
on the left-hand side and re-uses its buffer (growing it if
necessary). This is done to avoid allocating a new String
and copying the entire contents on
every operation, which would lead to O(n^2) running time when building an n-byte string by
repeated concatenation.
The string on the right-hand side is only borrowed; its contents are copied into the returned
String
.
Examples
Concatenating two String
s takes the first by value and borrows the second:
let a = String::from("hello"); let b = String::from(" world"); let c = a + &b; // `a` is moved and can no longer be used here.
If you want to keep using the first String
, you can clone it and append to the clone instead:
let a = String::from("hello"); let b = String::from(" world"); let c = a.clone() + &b; // `a` is still valid here.
Concatenating &str
slices can be done by converting the first to a String
:
let a = "hello"; let b = " world"; let c = a.to_string() + b;
impl<N, D1, D2, SB> Add<Matrix<N, D2, U1, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]
impl<N, D1, D2, SB> Add<Matrix<N, D2, U1, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]impl<N, R1, C1, R2, C2, SA, SB> Add<Matrix<N, R2, C2, SB>> for Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]
impl<N, R1, C1, R2, C2, SA, SB> Add<Matrix<N, R2, C2, SB>> for Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]type Output = Matrix<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
pub fn add(
self,
rhs: Matrix<N, R2, C2, SB>
) -> <Matrix<N, R1, C1, SA> as Add<Matrix<N, R2, C2, SB>>>::Output
[src]
self,
rhs: Matrix<N, R2, C2, SB>
) -> <Matrix<N, R1, C1, SA> as Add<Matrix<N, R2, C2, SB>>>::Output
impl<N> Add<Quaternion<N>> for Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]
impl<N> Add<Quaternion<N>> for Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]type Output = Quaternion<N>
pub fn add(
self,
rhs: Quaternion<N>
) -> <Quaternion<N> as Add<Quaternion<N>>>::Output
[src]
self,
rhs: Quaternion<N>
) -> <Quaternion<N> as Add<Quaternion<N>>>::Output
impl<'a, N, R1, C1, R2, C2, SA, SB> Add<Matrix<N, R2, C2, SB>> for &'a Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R2, C2, R1, C1>,
ShapeConstraint: SameNumberOfRows<R2, R1>,
ShapeConstraint: SameNumberOfColumns<C2, C1>,
[src]
impl<'a, N, R1, C1, R2, C2, SA, SB> Add<Matrix<N, R2, C2, SB>> for &'a Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R2, C2, R1, C1>,
ShapeConstraint: SameNumberOfRows<R2, R1>,
ShapeConstraint: SameNumberOfColumns<C2, C1>,
[src]type Output = Matrix<N, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R2, R1>>::Representative, <ShapeConstraint as SameNumberOfColumns<C2, C1>>::Representative>>::Buffer>
pub fn add(
self,
rhs: Matrix<N, R2, C2, SB>
) -> <&'a Matrix<N, R1, C1, SA> as Add<Matrix<N, R2, C2, SB>>>::Output
[src]
self,
rhs: Matrix<N, R2, C2, SB>
) -> <&'a Matrix<N, R1, C1, SA> as Add<Matrix<N, R2, C2, SB>>>::Output
impl<'a, 'b, N, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<N, R2, C2, SB>> for &'a Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]
impl<'a, 'b, N, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<N, R2, C2, SB>> for &'a Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]type Output = Matrix<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
pub fn add(
self,
rhs: &'b Matrix<N, R2, C2, SB>
) -> <&'a Matrix<N, R1, C1, SA> as Add<&'b Matrix<N, R2, C2, SB>>>::Output
[src]
self,
rhs: &'b Matrix<N, R2, C2, SB>
) -> <&'a Matrix<N, R1, C1, SA> as Add<&'b Matrix<N, R2, C2, SB>>>::Output
impl<'b, N> Add<&'b Quaternion<N>> for Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]
impl<'b, N> Add<&'b Quaternion<N>> for Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]type Output = Quaternion<N>
pub fn add(
self,
rhs: &'b Quaternion<N>
) -> <Quaternion<N> as Add<&'b Quaternion<N>>>::Output
[src]
self,
rhs: &'b Quaternion<N>
) -> <Quaternion<N> as Add<&'b Quaternion<N>>>::Output
impl<'b, N, D1, D2, SB> Add<&'b Matrix<N, D2, U1, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]
impl<'b, N, D1, D2, SB> Add<&'b Matrix<N, D2, U1, SB>> for Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]impl<'a, 'b, N> Add<&'b Quaternion<N>> for &'a Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]
impl<'a, 'b, N> Add<&'b Quaternion<N>> for &'a Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]type Output = Quaternion<N>
pub fn add(
self,
rhs: &'b Quaternion<N>
) -> <&'a Quaternion<N> as Add<&'b Quaternion<N>>>::Output
[src]
self,
rhs: &'b Quaternion<N>
) -> <&'a Quaternion<N> as Add<&'b Quaternion<N>>>::Output
impl<'a, 'b, N, D1, D2, SB> Add<&'b Matrix<N, D2, U1, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]
impl<'a, 'b, N, D1, D2, SB> Add<&'b Matrix<N, D2, U1, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]impl<'a, N, D1, D2, SB> Add<Matrix<N, D2, U1, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]
impl<'a, N, D1, D2, SB> Add<Matrix<N, D2, U1, SB>> for &'a Point<N, D1> where
N: Scalar + ClosedAdd<N>,
D1: DimName,
D2: Dim,
SB: Storage<N, D2, U1>,
DefaultAllocator: Allocator<N, D1, U1>,
DefaultAllocator: Allocator<N, D2, U1>,
DefaultAllocator: SameShapeAllocator<N, D1, U1, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
ShapeConstraint: SameNumberOfColumns<U1, U1>,
<ShapeConstraint as SameNumberOfRows<D1, D2>>::Representative == D1,
[src]impl<'a, N> Add<Quaternion<N>> for &'a Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]
impl<'a, N> Add<Quaternion<N>> for &'a Quaternion<N> where
N: SimdRealField,
<N as SimdValue>::Element: SimdRealField,
DefaultAllocator: Allocator<N, U4, U1>,
DefaultAllocator: Allocator<N, U4, U1>,
[src]type Output = Quaternion<N>
pub fn add(
self,
rhs: Quaternion<N>
) -> <&'a Quaternion<N> as Add<Quaternion<N>>>::Output
[src]
self,
rhs: Quaternion<N>
) -> <&'a Quaternion<N> as Add<Quaternion<N>>>::Output
impl<'b, N, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<N, R2, C2, SB>> for Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]
impl<'b, N, R1, C1, R2, C2, SA, SB> Add<&'b Matrix<N, R2, C2, SB>> for Matrix<N, R1, C1, SA> where
N: Scalar + ClosedAdd<N>,
R2: Dim,
C2: Dim,
SB: Storage<N, R2, C2>,
R1: Dim,
C1: Dim,
SA: Storage<N, R1, C1>,
DefaultAllocator: SameShapeAllocator<N, R1, C1, R2, C2>,
ShapeConstraint: SameNumberOfRows<R1, R2>,
ShapeConstraint: SameNumberOfColumns<C1, C2>,
[src]type Output = Matrix<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative, <DefaultAllocator as Allocator<N, <ShapeConstraint as SameNumberOfRows<R1, R2>>::Representative, <ShapeConstraint as SameNumberOfColumns<C1, C2>>::Representative>>::Buffer>
pub fn add(
self,
rhs: &'b Matrix<N, R2, C2, SB>
) -> <Matrix<N, R1, C1, SA> as Add<&'b Matrix<N, R2, C2, SB>>>::Output
[src]
self,
rhs: &'b Matrix<N, R2, C2, SB>
) -> <Matrix<N, R1, C1, SA> as Add<&'b Matrix<N, R2, C2, SB>>>::Output
impl Add<u128x1_generic> for u128x1_generic
impl Add<u128x1_generic> for u128x1_generic
impl Add<u64x2_generic> for u64x2_generic
impl Add<u64x2_generic> for u64x2_generic
impl Add<u32x4_generic> for u32x4_generic
impl Add<u32x4_generic> for u32x4_generic
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B0> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B0> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
UInt<Ul, B0> + UInt<Ur, B0> = UInt<Ul + Ur, B0>
impl<U, B> Add<UTerm> for UInt<U, B> where
B: Bit,
U: Unsigned,
impl<U, B> Add<UTerm> for UInt<U, B> where
B: Bit,
U: Unsigned,
UInt<U, B> + UTerm = UInt<U, B>
impl<U> Add<B1> for UInt<U, B0> where
U: Unsigned,
impl<U> Add<B1> for UInt<U, B0> where
U: Unsigned,
UInt<U, B0> + B1 = UInt<U + B1>
impl Add<ATerm> for ATerm
impl Add<ATerm> for ATerm
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B1> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B1> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
UInt<Ul, B1> + UInt<Ur, B0> = UInt<Ul + Ur, B1>
impl<I> Add<I> for Z0 where
I: Integer,
impl<I> Add<I> for Z0 where
I: Integer,
Z0 + I = I
impl<Ul, Ur> Add<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
impl<Ul, Ur> Add<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
P(Ul) + P(Ur) = P(Ul + Ur)
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B1> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
<Ul as Add<Ur>>::Output: Add<B1>,
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B1> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
<Ul as Add<Ur>>::Output: Add<B1>,
UInt<Ul, B1> + UInt<Ur, B1> = UInt<(Ul + Ur) + B1, B0>
impl<Ul, Ur> Add<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
impl<Ul, Ur> Add<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
impl<Ul, Ur> Add<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
impl<Ul, Ur> Add<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
N(Ul) + N(Ur) = N(Ul + Ur)
impl<U> Add<B1> for UInt<U, B1> where
U: Unsigned + Add<B1>,
<U as Add<B1>>::Output: Unsigned,
impl<U> Add<B1> for UInt<U, B1> where
U: Unsigned + Add<B1>,
<U as Add<B1>>::Output: Unsigned,
UInt<U, B1> + B1 = UInt<U + B1, B0>
impl Add<B1> for UTerm
impl Add<B1> for UTerm
UTerm + B1 = UInt<UTerm, B1>
impl<U> Add<Z0> for NInt<U> where
U: Unsigned + NonZero,
impl<U> Add<Z0> for NInt<U> where
U: Unsigned + NonZero,
NInt + Z0 = NInt
impl Add<B0> for UTerm
impl Add<B0> for UTerm
UTerm + B0 = UTerm
impl<U> Add<U> for UTerm where
U: Unsigned,
impl<U> Add<U> for UTerm where
U: Unsigned,
UTerm + U = U
impl<U> Add<Z0> for PInt<U> where
U: Unsigned + NonZero,
impl<U> Add<Z0> for PInt<U> where
U: Unsigned + NonZero,
PInt + Z0 = PInt
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B0> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B0> where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
UInt<Ul, B0> + UInt<Ur, B1> = UInt<Ul + Ur, B1>
impl<Ul, Ur> Add<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
impl<Ul, Ur> Add<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
impl<U, B> Add<B0> for UInt<U, B> where
B: Bit,
U: Unsigned,
impl<U, B> Add<B0> for UInt<U, B> where
B: Bit,
U: Unsigned,
U + B0 = U