fn wrapped_transform_addition<T>(i: T, b: Transform, expected: &str) -> Transform
where
    T: WrappingAdd
        + AsPrimitive<i32>
        + From<u32>
        + From<u64>
        + Into<Transform>
        + TryFrom<Transform, Error = String>,
    i32: AsPrimitive<T>,
{
    if let Transform::AddInt32(j) = b {
        i.wrapping_add(&j.as_()).into()
    } else if let Transform::AddUInt64(j) = b {
        i.wrapping_add(&j.into()).into()
    } else {
        match T::try_from(b) {
            Err(b_type) => Transform::Failure(
                StoredValueTypeMismatch::new(String::from(expected), b_type).into(),
            ),

            Ok(j) => i.wrapping_add(&j).into(),
        }
    }
}
/// Combines numeric `Transform`s into a single `Transform`. This is done by unwrapping the
/// `Transform` to obtain the underlying value, performing the wrapping addition then wrapping up as
/// a `Transform` again.
Combines numeric `Transform`s into a single `Transform`. This is done by unwrapping the
`Transform` to obtain the underlying value, performing the wrapping addition then wrapping up as
a `Transform` again.
Combines numeric ` Transform ` s into a single ` Transform ` . This is done by unwrapping the ` Transform ` to obtain the underlying value performing the wrapping addition then wrapping up as a ` Transform ` again .
fn wrapped_transform_addition<T>(i: T, b: Transform, expected: &str) -> Transform
where
    T: WrappingAdd
        + AsPrimitive<i32>
        + From<u32>
        + From<u64>
        + Into<Transform>
        + TryFrom<Transform, Error = String>,
    i32: AsPrimitive<T>,
{
    if let Transform::AddInt32(j) = b {
        i.wrapping_add(&j.as_()).into()
    } else if let Transform::AddUInt64(j) = b {
        i.wrapping_add(&j.into()).into()
    } else {
        match T::try_from(b) {
            Err(b_type) => Transform::Failure(
                StoredValueTypeMismatch::new(String::from(expected), b_type).into(),
            ),
            Ok(j) => i.wrapping_add(&j).into(),
        }
    }
}
fn wrapped_transform_addition < T > ( i : T , b : Transform , expected : & str ) -> Transform where T : WrappingAdd + AsPrimitive < i32 > + From < u32 > + From < u64 > + Into < Transform > + TryFrom < Transform , Error = String > , i32 : AsPrimitive < T > , { if let Transform :: AddInt32 ( j ) = b { i . wrapping_add ( & j . as_ ( ) ) . into ( ) } else if let Transform :: AddUInt64 ( j ) = b { i . wrapping_add ( & j . into ( ) ) . into ( ) } else { match T :: try_from ( b ) { Err ( b_type ) => Transform :: Failure ( StoredValueTypeMismatch :: new ( String :: from ( expected ) , b_type ) . into ( ) , ) , Ok ( j ) => i . wrapping_add ( & j ) . into ( ) , } } }
Combines numeric `Transform`s into a single `Transform`.
Combines numeric ` Transform ` s into a single ` Transform ` .
i
T
b
Transform
expected
&str
i
T
b
Transform
expected
&str