Trait otter_api_tests::imports::failure::_core::ops::Add1.0.0[][src]

pub trait Add<Rhs = Self> {
    type Output;
    #[must_use]
    fn add(self, rhs: Rhs) -> Self::Output;
}
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

Addable 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

type Output[src]

The resulting type after applying the + operator.

Required methods

#[must_use]
fn add(self, rhs: Rhs) -> Self::Output
[src]

Performs the + operation.

Example

assert_eq!(12 + 1, 13);

Implementations on Foreign Types

impl<'_> Add<&'_ i128> for i128[src]

type Output = <i128 as Add<i128>>::Output

pub fn add(self, other: &i128) -> <i128 as Add<i128>>::Output[src]

impl<'_, '_> Add<&'_ i8> for &'_ i8[src]

type Output = <i8 as Add<i8>>::Output

pub fn add(self, other: &i8) -> <i8 as Add<i8>>::Output[src]

impl<'a> Add<i8> for &'a i8[src]

type Output = <i8 as Add<i8>>::Output

pub fn add(self, other: i8) -> <i8 as Add<i8>>::Output[src]

impl<'_, '_> Add<&'_ i16> for &'_ i16[src]

type Output = <i16 as Add<i16>>::Output

pub fn add(self, other: &i16) -> <i16 as Add<i16>>::Output[src]

impl Add<f64> for f64[src]

type Output = f64

pub fn add(self, other: f64) -> f64[src]

impl<'_> Add<&'_ f64> for f64[src]

type Output = <f64 as Add<f64>>::Output

pub fn add(self, other: &f64) -> <f64 as Add<f64>>::Output[src]

impl Add<u32> for u32[src]

type Output = u32

pub fn add(self, other: u32) -> u32[src]

impl<'_> Add<&'_ f32> for f32[src]

type Output = <f32 as Add<f32>>::Output

pub fn add(self, other: &f32) -> <f32 as Add<f32>>::Output[src]

impl<'_, '_> Add<&'_ usize> for &'_ usize[src]

type Output = <usize as Add<usize>>::Output

pub fn add(self, other: &usize) -> <usize as Add<usize>>::Output[src]

impl Add<i64> for i64[src]

type Output = i64

pub fn add(self, other: i64) -> i64[src]

impl<'a> Add<u64> for &'a u64[src]

type Output = <u64 as Add<u64>>::Output

pub fn add(self, other: u64) -> <u64 as Add<u64>>::Output[src]

impl<'_> Add<&'_ i64> for i64[src]

type Output = <i64 as Add<i64>>::Output

pub fn add(self, other: &i64) -> <i64 as Add<i64>>::Output[src]

impl Add<i16> for i16[src]

type Output = i16

pub fn add(self, other: i16) -> i16[src]

impl<'a> Add<f32> for &'a f32[src]

type Output = <f32 as Add<f32>>::Output

pub fn add(self, other: f32) -> <f32 as Add<f32>>::Output[src]

impl<'a> Add<i32> for &'a i32[src]

type Output = <i32 as Add<i32>>::Output

pub fn add(self, other: i32) -> <i32 as Add<i32>>::Output[src]

impl<'a> Add<i128> for &'a i128[src]

type Output = <i128 as Add<i128>>::Output

pub fn add(self, other: i128) -> <i128 as Add<i128>>::Output[src]

impl<'_> Add<&'_ u8> for u8[src]

type Output = <u8 as Add<u8>>::Output

pub fn add(self, other: &u8) -> <u8 as Add<u8>>::Output[src]

impl Add<u128> for u128[src]

type Output = u128

pub fn add(self, other: u128) -> u128[src]

impl<'_> Add<&'_ usize> for usize[src]

type Output = <usize as Add<usize>>::Output

pub fn add(self, other: &usize) -> <usize as Add<usize>>::Output[src]

impl Add<i128> for i128[src]

type Output = i128

pub fn add(self, other: i128) -> i128[src]

impl<'a> Add<u8> for &'a u8[src]

type Output = <u8 as Add<u8>>::Output

pub fn add(self, other: u8) -> <u8 as Add<u8>>::Output[src]

impl<'a> Add<i16> for &'a i16[src]

type Output = <i16 as Add<i16>>::Output

pub fn add(self, other: i16) -> <i16 as Add<i16>>::Output[src]

impl Add<u8> for u8[src]

type Output = u8

pub fn add(self, other: u8) -> u8[src]

impl<'_> Add<&'_ u32> for u32[src]

type Output = <u32 as Add<u32>>::Output

pub fn add(self, other: &u32) -> <u32 as Add<u32>>::Output[src]

impl<'_, '_> Add<&'_ i32> for &'_ i32[src]

type Output = <i32 as Add<i32>>::Output

pub fn add(self, other: &i32) -> <i32 as Add<i32>>::Output[src]

impl<'a> Add<u16> for &'a u16[src]

type Output = <u16 as Add<u16>>::Output

pub fn add(self, other: u16) -> <u16 as Add<u16>>::Output[src]

impl<'_, '_> Add<&'_ u128> for &'_ u128[src]

type Output = <u128 as Add<u128>>::Output

pub fn add(self, other: &u128) -> <u128 as Add<u128>>::Output[src]

impl<'_, '_> Add<&'_ u32> for &'_ u32[src]

type Output = <u32 as Add<u32>>::Output

pub fn add(self, other: &u32) -> <u32 as Add<u32>>::Output[src]

impl<'a> Add<u32> for &'a u32[src]

type Output = <u32 as Add<u32>>::Output

pub fn add(self, other: u32) -> <u32 as Add<u32>>::Output[src]

impl<'_, '_> Add<&'_ u64> for &'_ u64[src]

type Output = <u64 as Add<u64>>::Output

pub fn add(self, other: &u64) -> <u64 as Add<u64>>::Output[src]

impl<'_, '_> Add<&'_ f64> for &'_ f64[src]

type Output = <f64 as Add<f64>>::Output

pub fn add(self, other: &f64) -> <f64 as Add<f64>>::Output[src]

impl<'_> Add<&'_ i16> for i16[src]

type Output = <i16 as Add<i16>>::Output

pub fn add(self, other: &i16) -> <i16 as Add<i16>>::Output[src]

impl Add<isize> for isize[src]

type Output = isize

pub fn add(self, other: isize) -> isize[src]

impl<'_> Add<&'_ i32> for i32[src]

type Output = <i32 as Add<i32>>::Output

pub fn add(self, other: &i32) -> <i32 as Add<i32>>::Output[src]

impl<'_> Add<&'_ u128> for u128[src]

type Output = <u128 as Add<u128>>::Output

pub fn add(self, other: &u128) -> <u128 as Add<u128>>::Output[src]

impl<'_, '_> Add<&'_ i128> for &'_ i128[src]

type Output = <i128 as Add<i128>>::Output

pub fn add(self, other: &i128) -> <i128 as Add<i128>>::Output[src]

impl Add<u64> for u64[src]

type Output = u64

pub fn add(self, other: u64) -> u64[src]

impl<'_, '_> Add<&'_ u16> for &'_ u16[src]

type Output = <u16 as Add<u16>>::Output

pub fn add(self, other: &u16) -> <u16 as Add<u16>>::Output[src]

impl<'a> Add<isize> for &'a isize[src]

type Output = <isize as Add<isize>>::Output

pub fn add(self, other: isize) -> <isize as Add<isize>>::Output[src]

impl<'a> Add<i64> for &'a i64[src]

type Output = <i64 as Add<i64>>::Output

pub fn add(self, other: i64) -> <i64 as Add<i64>>::Output[src]

impl Add<i32> for i32[src]

type Output = i32

pub fn add(self, other: i32) -> i32[src]

impl<'_, '_> Add<&'_ isize> for &'_ isize[src]

type Output = <isize as Add<isize>>::Output

pub fn add(self, other: &isize) -> <isize as Add<isize>>::Output[src]

impl Add<u16> for u16[src]

type Output = u16

pub fn add(self, other: u16) -> u16[src]

impl<'_, '_> Add<&'_ u8> for &'_ u8[src]

type Output = <u8 as Add<u8>>::Output

pub fn add(self, other: &u8) -> <u8 as Add<u8>>::Output[src]

impl<'_, '_> Add<&'_ f32> for &'_ f32[src]

type Output = <f32 as Add<f32>>::Output

pub fn add(self, other: &f32) -> <f32 as Add<f32>>::Output[src]

impl<'a> Add<f64> for &'a f64[src]

type Output = <f64 as Add<f64>>::Output

pub fn add(self, other: f64) -> <f64 as Add<f64>>::Output[src]

impl<'a> Add<usize> for &'a usize[src]

type Output = <usize as Add<usize>>::Output

pub fn add(self, other: usize) -> <usize as Add<usize>>::Output[src]

impl<'_> Add<&'_ u64> for u64[src]

type Output = <u64 as Add<u64>>::Output

pub fn add(self, other: &u64) -> <u64 as Add<u64>>::Output[src]

impl Add<i8> for i8[src]

type Output = i8

pub fn add(self, other: i8) -> i8[src]

impl Add<usize> for usize[src]

type Output = usize

pub fn add(self, other: usize) -> usize[src]

impl<'_> Add<&'_ i8> for i8[src]

type Output = <i8 as Add<i8>>::Output

pub fn add(self, other: &i8) -> <i8 as Add<i8>>::Output[src]

impl Add<f32> for f32[src]

type Output = f32

pub fn add(self, other: f32) -> f32[src]

impl<'a> Add<u128> for &'a u128[src]

type Output = <u128 as Add<u128>>::Output

pub fn add(self, other: u128) -> <u128 as Add<u128>>::Output[src]

impl<'_> Add<&'_ u16> for u16[src]

type Output = <u16 as Add<u16>>::Output

pub fn add(self, other: &u16) -> <u16 as Add<u16>>::Output[src]

impl<'_, '_> Add<&'_ i64> for &'_ i64[src]

type Output = <i64 as Add<i64>>::Output

pub fn add(self, other: &i64) -> <i64 as Add<i64>>::Output[src]

impl<'_> Add<&'_ isize> for isize[src]

type Output = <isize as Add<isize>>::Output

pub fn add(self, other: &isize) -> <isize as Add<isize>>::Output[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 Strings 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;

type Output = String

pub fn add(self, other: &str) -> String[src]

impl Add<FaceId> for usize[src]

type Output = FaceId

pub fn add(self, other: FaceId) -> FaceId[src]

impl Add<LibInBundleI> for usize[src]

type Output = LibInBundleI

pub fn add(self, other: LibInBundleI) -> LibInBundleI[src]

impl Add<Notch> for usize[src]

type Output = Notch

pub fn add(self, other: Notch) -> Notch[src]

impl Add<InHand> for usize[src]

type Output = InHand

pub fn add(self, other: InHand) -> InHand[src]

impl Add<DescId> for usize[src]

type Output = DescId

pub fn add(self, other: DescId) -> DescId[src]

impl Add<SvgId> for usize[src]

type Output = SvgId

pub fn add(self, other: SvgId) -> SvgId[src]

impl Add<Duration> for Tm[src]

pub fn add(self, other: Duration) -> Tm[src]

The resulting Tm is in UTC.

type Output = Tm

impl Add<Duration> for Timespec[src]

type Output = Timespec

pub fn add(self, other: Duration) -> Timespec[src]

impl Add<Duration> for SteadyTime[src]

type Output = SteadyTime

pub fn add(self, other: Duration) -> SteadyTime[src]

impl<'a, 'b, T> Add<&'b T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: &'b T) -> Ratio<T>[src]

impl<'a, T> Add<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: T) -> Ratio<T>[src]

impl<'a, T> Add<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: &Ratio<T>) -> Ratio<T>[src]

impl<'a, T> Add<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: &T) -> Ratio<T>[src]

impl<'a, 'b, T> Add<&'b Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: &'b Ratio<T>) -> Ratio<T>[src]

impl<T> Add<Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, rhs: Ratio<T>) -> Ratio<T>[src]

impl<'a, T> Add<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, other: Ratio<T>) -> Ratio<T>[src]

impl<T> Add<T> for Ratio<T> where
    T: Clone + Integer
[src]

type Output = Ratio<T>

pub fn add(self, rhs: T) -> Ratio<T>[src]

impl Add<Duration> for Instant

type Output = Instant

pub fn add(self, other: Duration) -> Instant

impl<'a, 'b> Add<&'b BigNum> for &'a BigNum[src]

type Output = BigNum

pub fn add(self, oth: &BigNum) -> BigNum[src]

impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNumRef[src]

type Output = BigNum

pub fn add(self, oth: &BigNumRef) -> BigNum[src]

impl<'a, 'b> Add<&'b BigNum> for &'a BigNumRef[src]

type Output = BigNum

pub fn add(self, oth: &BigNum) -> BigNum[src]

impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNum[src]

type Output = BigNum

pub fn add(self, oth: &BigNumRef) -> BigNum[src]

Implementors

impl Add<usize> for LibInBundleI[src]

type Output = LibInBundleI

pub fn add(self, other: usize) -> LibInBundleI[src]

impl Add<usize> for DescId[src]

type Output = DescId

pub fn add(self, other: usize) -> DescId[src]

impl Add<usize> for SvgId[src]

type Output = SvgId

pub fn add(self, other: usize) -> SvgId[src]

impl Add<usize> for FaceId[src]

type Output = FaceId

pub fn add(self, other: usize) -> FaceId[src]

impl Add<usize> for Notch[src]

type Output = Notch

pub fn add(self, other: usize) -> Notch[src]

impl Add<LibInBundleI> for LibInBundleI[src]

type Output = LibInBundleI

pub fn add(self, other: LibInBundleI) -> LibInBundleI[src]

impl Add<DescId> for DescId[src]

type Output = DescId

pub fn add(self, other: DescId) -> DescId[src]

impl Add<Duration> for otter_api_tests::shapelib::Duration1.3.0[src]

type Output = Duration

pub fn add(self, rhs: Duration) -> Duration[src]

impl Add<Duration> for otter_api_tests::shapelib::Instant1.8.0[src]

pub fn add(self, other: Duration) -> Instant[src]

Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

type Output = Instant

impl Add<Duration> for SystemTime1.8.0[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<SvgId> for SvgId[src]

type Output = SvgId

pub fn add(self, other: SvgId) -> SvgId[src]

impl Add<TimeSpec> for TimeSpec

type Output = TimeSpec

pub fn add(self, rhs: TimeSpec) -> TimeSpec

impl Add<Wrapping<i8>> for Wrapping<i8>[src]

type Output = Wrapping<i8>

pub fn add(self, other: Wrapping<i8>) -> Wrapping<i8>[src]

impl Add<Wrapping<i16>> for Wrapping<i16>[src]

type Output = Wrapping<i16>

pub fn add(self, other: Wrapping<i16>) -> Wrapping<i16>[src]

impl Add<Wrapping<i32>> for Wrapping<i32>[src]

type Output = Wrapping<i32>

pub fn add(self, other: Wrapping<i32>) -> Wrapping<i32>[src]

impl Add<Wrapping<i64>> for Wrapping<i64>[src]

type Output = Wrapping<i64>

pub fn add(self, other: Wrapping<i64>) -> Wrapping<i64>[src]

impl Add<Wrapping<i128>> for Wrapping<i128>[src]

type Output = Wrapping<i128>

pub fn add(self, other: Wrapping<i128>) -> Wrapping<i128>[src]

impl Add<Wrapping<isize>> for Wrapping<isize>[src]

type Output = Wrapping<isize>

pub fn add(self, other: Wrapping<isize>) -> Wrapping<isize>[src]

impl Add<Wrapping<u8>> for Wrapping<u8>[src]

type Output = Wrapping<u8>

pub fn add(self, other: Wrapping<u8>) -> Wrapping<u8>[src]

impl Add<Wrapping<u16>> for Wrapping<u16>[src]

type Output = Wrapping<u16>

pub fn add(self, other: Wrapping<u16>) -> Wrapping<u16>[src]

impl Add<Wrapping<u32>> for Wrapping<u32>[src]

type Output = Wrapping<u32>

pub fn add(self, other: Wrapping<u32>) -> Wrapping<u32>[src]

impl Add<Wrapping<u64>> for Wrapping<u64>[src]

type Output = Wrapping<u64>

pub fn add(self, other: Wrapping<u64>) -> Wrapping<u64>[src]

impl Add<Wrapping<u128>> for Wrapping<u128>[src]

type Output = Wrapping<u128>

pub fn add(self, other: Wrapping<u128>) -> Wrapping<u128>[src]

impl Add<Wrapping<usize>> for Wrapping<usize>[src]

type Output = Wrapping<usize>

pub fn add(self, other: Wrapping<usize>) -> Wrapping<usize>[src]

impl Add<FaceId> for FaceId[src]

type Output = FaceId

pub fn add(self, other: FaceId) -> FaceId[src]

impl Add<Notch> for Notch[src]

type Output = Notch

pub fn add(self, other: Notch) -> Notch[src]

impl Add<LimbVal> for LimbVal

type Output = LimbVal

pub fn add(self, rhs: LimbVal) -> LimbVal

impl Add<Duration> for otter_api_tests::imports::chrono::Duration[src]

type Output = Duration

pub fn add(self, rhs: Duration) -> Duration[src]

impl Add<Duration> for NaiveDate[src]

An addition of Duration to NaiveDate discards the fractional days, rounding to the closest integral number of days towards Duration::zero().

Panics on underflow or overflow. Use NaiveDate::checked_add_signed to detect that.

Example

use chrono::{Duration, NaiveDate};

let from_ymd = NaiveDate::from_ymd;

assert_eq!(from_ymd(2014, 1, 1) + Duration::zero(),             from_ymd(2014, 1, 1));
assert_eq!(from_ymd(2014, 1, 1) + Duration::seconds(86399),     from_ymd(2014, 1, 1));
assert_eq!(from_ymd(2014, 1, 1) + Duration::seconds(-86399),    from_ymd(2014, 1, 1));
assert_eq!(from_ymd(2014, 1, 1) + Duration::days(1),            from_ymd(2014, 1, 2));
assert_eq!(from_ymd(2014, 1, 1) + Duration::days(-1),           from_ymd(2013, 12, 31));
assert_eq!(from_ymd(2014, 1, 1) + Duration::days(364),          from_ymd(2014, 12, 31));
assert_eq!(from_ymd(2014, 1, 1) + Duration::days(365*4 + 1),    from_ymd(2018, 1, 1));
assert_eq!(from_ymd(2014, 1, 1) + Duration::days(365*400 + 97), from_ymd(2414, 1, 1));

type Output = NaiveDate

pub fn add(self, rhs: Duration) -> NaiveDate[src]

impl Add<Duration> for NaiveDateTime[src]

An addition of Duration to NaiveDateTime yields another NaiveDateTime.

As a part of Chrono’s leap second handling, the addition assumes that there is no leap second ever, except when the NaiveDateTime itself represents a leap second in which case the assumption becomes that there is exactly a single leap second ever.

Panics on underflow or overflow. Use NaiveDateTime::checked_add_signed to detect that.

Example

use chrono::{Duration, NaiveDate};

let from_ymd = NaiveDate::from_ymd;

let d = from_ymd(2016, 7, 8);
let hms = |h, m, s| d.and_hms(h, m, s);
assert_eq!(hms(3, 5, 7) + Duration::zero(),             hms(3, 5, 7));
assert_eq!(hms(3, 5, 7) + Duration::seconds(1),         hms(3, 5, 8));
assert_eq!(hms(3, 5, 7) + Duration::seconds(-1),        hms(3, 5, 6));
assert_eq!(hms(3, 5, 7) + Duration::seconds(3600 + 60), hms(4, 6, 7));
assert_eq!(hms(3, 5, 7) + Duration::seconds(86_400),
           from_ymd(2016, 7, 9).and_hms(3, 5, 7));
assert_eq!(hms(3, 5, 7) + Duration::days(365),
           from_ymd(2017, 7, 8).and_hms(3, 5, 7));

let hmsm = |h, m, s, milli| d.and_hms_milli(h, m, s, milli);
assert_eq!(hmsm(3, 5, 7, 980) + Duration::milliseconds(450), hmsm(3, 5, 8, 430));

Leap seconds are handled, but the addition assumes that it is the only leap second happened.

let leap = hmsm(3, 5, 59, 1_300);
assert_eq!(leap + Duration::zero(),             hmsm(3, 5, 59, 1_300));
assert_eq!(leap + Duration::milliseconds(-500), hmsm(3, 5, 59, 800));
assert_eq!(leap + Duration::milliseconds(500),  hmsm(3, 5, 59, 1_800));
assert_eq!(leap + Duration::milliseconds(800),  hmsm(3, 6, 0, 100));
assert_eq!(leap + Duration::seconds(10),        hmsm(3, 6, 9, 300));
assert_eq!(leap + Duration::seconds(-10),       hmsm(3, 5, 50, 300));
assert_eq!(leap + Duration::days(1),
           from_ymd(2016, 7, 9).and_hms_milli(3, 5, 59, 300));

type Output = NaiveDateTime

pub fn add(self, rhs: Duration) -> NaiveDateTime[src]

impl Add<Duration> for NaiveTime[src]

An addition of Duration to NaiveTime wraps around and never overflows or underflows. In particular the addition ignores integral number of days.

As a part of Chrono’s leap second handling, the addition assumes that there is no leap second ever, except when the NaiveTime itself represents a leap second in which case the assumption becomes that there is exactly a single leap second ever.

Example

use chrono::{Duration, NaiveTime};

let from_hmsm = NaiveTime::from_hms_milli;

assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::zero(),                  from_hmsm(3, 5, 7, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(1),              from_hmsm(3, 5, 8, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(-1),             from_hmsm(3, 5, 6, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(60 + 4),         from_hmsm(3, 6, 11, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(7*60*60 - 6*60), from_hmsm(9, 59, 7, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::milliseconds(80),        from_hmsm(3, 5, 7, 80));
assert_eq!(from_hmsm(3, 5, 7, 950) + Duration::milliseconds(280),     from_hmsm(3, 5, 8, 230));
assert_eq!(from_hmsm(3, 5, 7, 950) + Duration::milliseconds(-980),    from_hmsm(3, 5, 6, 970));

The addition wraps around.

assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(22*60*60), from_hmsm(1, 5, 7, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(-8*60*60), from_hmsm(19, 5, 7, 0));
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::days(800),         from_hmsm(3, 5, 7, 0));

Leap seconds are handled, but the addition assumes that it is the only leap second happened.

let leap = from_hmsm(3, 5, 59, 1_300);
assert_eq!(leap + Duration::zero(),             from_hmsm(3, 5, 59, 1_300));
assert_eq!(leap + Duration::milliseconds(-500), from_hmsm(3, 5, 59, 800));
assert_eq!(leap + Duration::milliseconds(500),  from_hmsm(3, 5, 59, 1_800));
assert_eq!(leap + Duration::milliseconds(800),  from_hmsm(3, 6, 0, 100));
assert_eq!(leap + Duration::seconds(10),        from_hmsm(3, 6, 9, 300));
assert_eq!(leap + Duration::seconds(-10),       from_hmsm(3, 5, 50, 300));
assert_eq!(leap + Duration::days(1),            from_hmsm(3, 5, 59, 300));

type Output = NaiveTime

pub fn add(self, rhs: Duration) -> NaiveTime[src]

impl Add<FixedOffset> for NaiveDateTime[src]

impl Add<FixedOffset> for NaiveTime[src]

type Output = NaiveTime

pub fn add(self, rhs: FixedOffset) -> NaiveTime[src]

impl Add<ATerm> for ATerm

type Output = ATerm

pub fn add(self, ATerm) -> <ATerm as Add<ATerm>>::Output

impl Add<B0> for UTerm

UTerm + B0 = UTerm

type Output = UTerm

pub fn add(self, B0) -> <UTerm as Add<B0>>::Output

impl Add<B1> for UTerm

UTerm + B1 = UInt<UTerm, B1>

type Output = UInt<UTerm, B1>

pub fn add(self, B1) -> <UTerm as Add<B1>>::Output

impl Add<TimeVal> for TimeVal

type Output = TimeVal

pub fn add(self, rhs: TimeVal) -> TimeVal

impl<'_> Add<&'_ Wrapping<i8>> for Wrapping<i8>1.14.0[src]

type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output

pub fn add(
    self,
    other: &Wrapping<i8>
) -> <Wrapping<i8> as Add<Wrapping<i8>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<i16>> for Wrapping<i16>1.14.0[src]

type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output

pub fn add(
    self,
    other: &Wrapping<i16>
) -> <Wrapping<i16> as Add<Wrapping<i16>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<i32>> for Wrapping<i32>1.14.0[src]

type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output

pub fn add(
    self,
    other: &Wrapping<i32>
) -> <Wrapping<i32> as Add<Wrapping<i32>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<i64>> for Wrapping<i64>1.14.0[src]

type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output

pub fn add(
    self,
    other: &Wrapping<i64>
) -> <Wrapping<i64> as Add<Wrapping<i64>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<i128>> for Wrapping<i128>1.14.0[src]

type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output

pub fn add(
    self,
    other: &Wrapping<i128>
) -> <Wrapping<i128> as Add<Wrapping<i128>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<isize>> for Wrapping<isize>1.14.0[src]

type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output

pub fn add(
    self,
    other: &Wrapping<isize>
) -> <Wrapping<isize> as Add<Wrapping<isize>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<u8>> for Wrapping<u8>1.14.0[src]

type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output

pub fn add(
    self,
    other: &Wrapping<u8>
) -> <Wrapping<u8> as Add<Wrapping<u8>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<u16>> for Wrapping<u16>1.14.0[src]

type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output

pub fn add(
    self,
    other: &Wrapping<u16>
) -> <Wrapping<u16> as Add<Wrapping<u16>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<u32>> for Wrapping<u32>1.14.0[src]

type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output

pub fn add(
    self,
    other: &Wrapping<u32>
) -> <Wrapping<u32> as Add<Wrapping<u32>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<u64>> for Wrapping<u64>1.14.0[src]

type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output

pub fn add(
    self,
    other: &Wrapping<u64>
) -> <Wrapping<u64> as Add<Wrapping<u64>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<u128>> for Wrapping<u128>1.14.0[src]

type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output

pub fn add(
    self,
    other: &Wrapping<u128>
) -> <Wrapping<u128> as Add<Wrapping<u128>>>::Output
[src]

impl<'_> Add<&'_ Wrapping<usize>> for Wrapping<usize>1.14.0[src]

type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output

pub fn add(
    self,
    other: &Wrapping<usize>
) -> <Wrapping<usize> as Add<Wrapping<usize>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<i8>> for &'_ Wrapping<i8>1.14.0[src]

type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output

pub fn add(
    self,
    other: &Wrapping<i8>
) -> <Wrapping<i8> as Add<Wrapping<i8>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<i16>> for &'_ Wrapping<i16>1.14.0[src]

type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output

pub fn add(
    self,
    other: &Wrapping<i16>
) -> <Wrapping<i16> as Add<Wrapping<i16>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<i32>> for &'_ Wrapping<i32>1.14.0[src]

type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output

pub fn add(
    self,
    other: &Wrapping<i32>
) -> <Wrapping<i32> as Add<Wrapping<i32>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<i64>> for &'_ Wrapping<i64>1.14.0[src]

type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output

pub fn add(
    self,
    other: &Wrapping<i64>
) -> <Wrapping<i64> as Add<Wrapping<i64>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<i128>> for &'_ Wrapping<i128>1.14.0[src]

type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output

pub fn add(
    self,
    other: &Wrapping<i128>
) -> <Wrapping<i128> as Add<Wrapping<i128>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<isize>> for &'_ Wrapping<isize>1.14.0[src]

type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output

pub fn add(
    self,
    other: &Wrapping<isize>
) -> <Wrapping<isize> as Add<Wrapping<isize>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<u8>> for &'_ Wrapping<u8>1.14.0[src]

type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output

pub fn add(
    self,
    other: &Wrapping<u8>
) -> <Wrapping<u8> as Add<Wrapping<u8>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<u16>> for &'_ Wrapping<u16>1.14.0[src]

type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output

pub fn add(
    self,
    other: &Wrapping<u16>
) -> <Wrapping<u16> as Add<Wrapping<u16>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<u32>> for &'_ Wrapping<u32>1.14.0[src]

type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output

pub fn add(
    self,
    other: &Wrapping<u32>
) -> <Wrapping<u32> as Add<Wrapping<u32>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<u64>> for &'_ Wrapping<u64>1.14.0[src]

type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output

pub fn add(
    self,
    other: &Wrapping<u64>
) -> <Wrapping<u64> as Add<Wrapping<u64>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<u128>> for &'_ Wrapping<u128>1.14.0[src]

type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output

pub fn add(
    self,
    other: &Wrapping<u128>
) -> <Wrapping<u128> as Add<Wrapping<u128>>>::Output
[src]

impl<'_, '_> Add<&'_ Wrapping<usize>> for &'_ Wrapping<usize>1.14.0[src]

type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output

pub fn add(
    self,
    other: &Wrapping<usize>
) -> <Wrapping<usize> as Add<Wrapping<usize>>>::Output
[src]

impl<'_, '_, T> Add<&'_ T> for &'_ NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: &T) -> <&'_ NotNan<T> as Add<&'_ T>>::Output

impl<'_, T> Add<&'_ NotNan<T>> for &'_ NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(
    self,
    other: &'_ NotNan<T>
) -> <&'_ NotNan<T> as Add<&'_ NotNan<T>>>::Output

impl<'_, T> Add<&'_ NotNan<T>> for NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: &NotNan<T>) -> <NotNan<T> as Add<&'_ NotNan<T>>>::Output

impl<'_, T> Add<&'_ T> for NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: &T) -> <NotNan<T> as Add<&'_ T>>::Output

impl<'_, T> Add<NotNan<T>> for &'_ NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: NotNan<T>) -> <&'_ NotNan<T> as Add<NotNan<T>>>::Output

impl<'_, T> Add<T> for &'_ NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: T) -> <&'_ NotNan<T> as Add<T>>::Output

impl<'a> Add<&'a str> for Cow<'a, str>1.14.0[src]

type Output = Cow<'a, str>

pub fn add(self, rhs: &'a str) -> <Cow<'a, str> as Add<&'a str>>::Output[src]

impl<'a> Add<Cow<'a, str>> for Cow<'a, str>1.14.0[src]

type Output = Cow<'a, str>

pub fn add(
    self,
    rhs: Cow<'a, str>
) -> <Cow<'a, str> as Add<Cow<'a, str>>>::Output
[src]

impl<'a> Add<Wrapping<i8>> for &'a Wrapping<i8>1.14.0[src]

type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output

pub fn add(
    self,
    other: Wrapping<i8>
) -> <Wrapping<i8> as Add<Wrapping<i8>>>::Output
[src]

impl<'a> Add<Wrapping<i16>> for &'a Wrapping<i16>1.14.0[src]

type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output

pub fn add(
    self,
    other: Wrapping<i16>
) -> <Wrapping<i16> as Add<Wrapping<i16>>>::Output
[src]

impl<'a> Add<Wrapping<i32>> for &'a Wrapping<i32>1.14.0[src]

type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output

pub fn add(
    self,
    other: Wrapping<i32>
) -> <Wrapping<i32> as Add<Wrapping<i32>>>::Output
[src]

impl<'a> Add<Wrapping<i64>> for &'a Wrapping<i64>1.14.0[src]

type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output

pub fn add(
    self,
    other: Wrapping<i64>
) -> <Wrapping<i64> as Add<Wrapping<i64>>>::Output
[src]

impl<'a> Add<Wrapping<i128>> for &'a Wrapping<i128>1.14.0[src]

type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output

pub fn add(
    self,
    other: Wrapping<i128>
) -> <Wrapping<i128> as Add<Wrapping<i128>>>::Output
[src]

impl<'a> Add<Wrapping<isize>> for &'a Wrapping<isize>1.14.0[src]

type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output

pub fn add(
    self,
    other: Wrapping<isize>
) -> <Wrapping<isize> as Add<Wrapping<isize>>>::Output
[src]

impl<'a> Add<Wrapping<u8>> for &'a Wrapping<u8>1.14.0[src]

type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output

pub fn add(
    self,
    other: Wrapping<u8>
) -> <Wrapping<u8> as Add<Wrapping<u8>>>::Output
[src]

impl<'a> Add<Wrapping<u16>> for &'a Wrapping<u16>1.14.0[src]

type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output

pub fn add(
    self,
    other: Wrapping<u16>
) -> <Wrapping<u16> as Add<Wrapping<u16>>>::Output
[src]

impl<'a> Add<Wrapping<u32>> for &'a Wrapping<u32>1.14.0[src]

type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output

pub fn add(
    self,
    other: Wrapping<u32>
) -> <Wrapping<u32> as Add<Wrapping<u32>>>::Output
[src]

impl<'a> Add<Wrapping<u64>> for &'a Wrapping<u64>1.14.0[src]

type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output

pub fn add(
    self,
    other: Wrapping<u64>
) -> <Wrapping<u64> as Add<Wrapping<u64>>>::Output
[src]

impl<'a> Add<Wrapping<u128>> for &'a Wrapping<u128>1.14.0[src]

type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output

pub fn add(
    self,
    other: Wrapping<u128>
) -> <Wrapping<u128> as Add<Wrapping<u128>>>::Output
[src]

impl<'a> Add<Wrapping<usize>> for &'a Wrapping<usize>1.14.0[src]

type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output

pub fn add(
    self,
    other: Wrapping<usize>
) -> <Wrapping<usize> as Add<Wrapping<usize>>>::Output
[src]

impl<'a, T> Add<&'a &'a OrderedFloat<T>> for &'a OrderedFloat<T> where
    &'a T: Add<&'a T>, 

type Output = OrderedFloat<<&'a T as Add<&'a T>>::Output>

pub fn add(
    self,
    other: &'a &'a OrderedFloat<T>
) -> <&'a OrderedFloat<T> as Add<&'a &'a OrderedFloat<T>>>::Output

impl<'a, T> Add<&'a OrderedFloat<T>> for &'a OrderedFloat<T> where
    &'a T: Add<&'a T>, 

type Output = OrderedFloat<<&'a T as Add<&'a T>>::Output>

pub fn add(
    self,
    other: &'a OrderedFloat<T>
) -> <&'a OrderedFloat<T> as Add<&'a OrderedFloat<T>>>::Output

impl<'a, T> Add<&'a OrderedFloat<T>> for OrderedFloat<T> where
    T: Add<&'a T>, 

type Output = OrderedFloat<<T as Add<&'a T>>::Output>

pub fn add(
    self,
    other: &'a OrderedFloat<T>
) -> <OrderedFloat<T> as Add<&'a OrderedFloat<T>>>::Output

impl<'a, T> Add<&'a T> for &'a OrderedFloat<T> where
    &'a T: Add<&'a T>, 

type Output = OrderedFloat<<&'a T as Add<&'a T>>::Output>

pub fn add(self, other: &'a T) -> <&'a OrderedFloat<T> as Add<&'a T>>::Output

impl<'a, T> Add<&'a T> for OrderedFloat<T> where
    T: Add<&'a T>, 

type Output = OrderedFloat<<T as Add<&'a T>>::Output>

pub fn add(self, other: &'a T) -> <OrderedFloat<T> as Add<&'a T>>::Output

impl<'a, T> Add<OrderedFloat<T>> for &'a OrderedFloat<T> where
    &'a T: Add<T>, 

type Output = OrderedFloat<<&'a T as Add<T>>::Output>

pub fn add(
    self,
    other: OrderedFloat<T>
) -> <&'a OrderedFloat<T> as Add<OrderedFloat<T>>>::Output

impl<'a, T> Add<T> for &'a OrderedFloat<T> where
    &'a T: Add<T>, 

type Output = OrderedFloat<<&'a T as Add<T>>::Output>

pub fn add(self, other: T) -> <&'a OrderedFloat<T> as Add<T>>::Output

impl<Al, Vl, Ar, Vr> Add<TArr<Vr, Ar>> for TArr<Vl, Al> where
    Vl: Add<Vr>,
    Al: Add<Ar>, 

type Output = TArr<<Vl as Add<Vr>>::Output, <Al as Add<Ar>>::Output>

pub fn add(
    self,
    rhs: TArr<Vr, Ar>
) -> <TArr<Vl, Al> as Add<TArr<Vr, Ar>>>::Output

impl<I> Add<I> for Z0 where
    I: Integer

Z0 + I = I

type Output = I

pub fn add(self, rhs: I) -> <Z0 as Add<I>>::Output

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

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

pub fn add(
    self,
    other: OrderedFloat<T>
) -> <OrderedFloat<T> as Add<OrderedFloat<T>>>::Output

impl<T> Add<PosC<T>> for PosC<T> where
    T: CheckedArith

type Output = Result<PosC<T>, CoordinateOverflow>

pub fn add(self, rhs: PosC<T>) -> Result<PosC<T>, CoordinateOverflow>

impl<T> Add<NotNan<T>> for NotNan<T> where
    T: Float

type Output = NotNan<T>

pub fn add(self, other: NotNan<T>) -> NotNan<T>

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

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

pub fn add(self, other: T) -> <OrderedFloat<T> as Add<T>>::Output

impl<T> Add<T> for NotNan<T> where
    T: Float

Adds a float directly.

Panics if the provided value is NaN or the computation results in NaN

type Output = NotNan<T>

pub fn add(self, other: T) -> NotNan<T>

impl<Tz> Add<Duration> for Date<Tz> where
    Tz: TimeZone
[src]

type Output = Date<Tz>

pub fn add(self, rhs: Duration) -> Date<Tz>[src]

impl<Tz> Add<Duration> for DateTime<Tz> where
    Tz: TimeZone
[src]

type Output = DateTime<Tz>

pub fn add(self, rhs: Duration) -> DateTime<Tz>[src]

impl<Tz> Add<FixedOffset> for DateTime<Tz> where
    Tz: TimeZone
[src]

type Output = DateTime<Tz>

pub fn add(self, rhs: FixedOffset) -> DateTime<Tz>[src]

impl<U> Add<B1> for UInt<U, B0> where
    U: Unsigned

UInt<U, B0> + B1 = UInt<U + B1>

type Output = UInt<U, B1>

pub fn add(self, B1) -> <UInt<U, B0> as Add<B1>>::Output

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>

type Output = UInt<<U as Add<B1>>::Output, B0>

pub fn add(self, B1) -> <UInt<U, B1> as Add<B1>>::Output

impl<U> Add<Z0> for NInt<U> where
    U: Unsigned + NonZero

NInt + Z0 = NInt

type Output = NInt<U>

pub fn add(self, Z0) -> <NInt<U> as Add<Z0>>::Output

impl<U> Add<Z0> for PInt<U> where
    U: Unsigned + NonZero

PInt + Z0 = PInt

type Output = PInt<U>

pub fn add(self, Z0) -> <PInt<U> as Add<Z0>>::Output

impl<U> Add<U> for UTerm where
    U: Unsigned

UTerm + U = U

type Output = U

pub fn add(self, rhs: U) -> <UTerm as Add<U>>::Output

impl<U, B> Add<B0> for UInt<U, B> where
    U: Unsigned,
    B: Bit

U + B0 = U

type Output = UInt<U, B>

pub fn add(self, B0) -> <UInt<U, B> as Add<B0>>::Output

impl<U, B> Add<UTerm> for UInt<U, B> where
    U: Unsigned,
    B: Bit

UInt<U, B> + UTerm = UInt<U, B>

type Output = UInt<U, B>

pub fn add(self, UTerm) -> <UInt<U, B> as Add<UTerm>>::Output

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)

type Output = NInt<<Ul as Add<Ur>>::Output>

pub fn add(self, NInt<Ur>) -> <NInt<Ul> as Add<NInt<Ur>>>::Output

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

type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output

pub fn add(self, rhs: NInt<Ur>) -> <PInt<Ul> as Add<NInt<Ur>>>::Output

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

type Output = <Ur as PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>>::Output

pub fn add(self, rhs: PInt<Ur>) -> <NInt<Ul> as Add<PInt<Ur>>>::Output

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)

type Output = PInt<<Ul as Add<Ur>>::Output>

pub fn add(self, PInt<Ur>) -> <PInt<Ul> as Add<PInt<Ur>>>::Output

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>

type Output = UInt<<Ul as Add<Ur>>::Output, B0>

pub fn add(
    self,
    rhs: UInt<Ur, B0>
) -> <UInt<Ul, B0> as Add<UInt<Ur, B0>>>::Output

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>

type Output = UInt<<Ul as Add<Ur>>::Output, B1>

pub fn add(
    self,
    rhs: UInt<Ur, B0>
) -> <UInt<Ul, B1> as Add<UInt<Ur, B0>>>::Output

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>

type Output = UInt<<Ul as Add<Ur>>::Output, B1>

pub fn add(
    self,
    rhs: UInt<Ur, B1>
) -> <UInt<Ul, B0> as Add<UInt<Ur, B1>>>::Output

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>

type Output = UInt<<<Ul as Add<Ur>>::Output as Add<B1>>::Output, B0>

pub fn add(
    self,
    rhs: UInt<Ur, B1>
) -> <UInt<Ul, B1> as Add<UInt<Ur, B1>>>::Output