devela::_core::iter

Trait Sum

1.12.0 · Source
pub trait Sum<A = Self>: Sized {
    // Required method
    fn sum<I>(iter: I) -> Self
       where I: Iterator<Item = A>;
}
Expand description

Trait to represent types that can be created by summing up an iterator.

This trait is used to implement Iterator::sum(). Types which implement this trait can be generated by using the sum() method on an iterator. Like FromIterator, this trait should rarely be called directly.

Required Methods§

1.12.0 · Source

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = A>,

Takes an iterator and generates Self from the elements by “summing up” the items.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

1.12.0 · Source§

impl Sum for f32

1.12.0 · Source§

impl Sum for f64

1.12.0 · Source§

impl Sum for i8

1.12.0 · Source§

impl Sum for i16

1.12.0 · Source§

impl Sum for i32

1.12.0 · Source§

impl Sum for i64

1.12.0 · Source§

impl Sum for i128

1.12.0 · Source§

impl Sum for isize

1.12.0 · Source§

impl Sum for u8

1.12.0 · Source§

impl Sum for u16

1.12.0 · Source§

impl Sum for u32

1.12.0 · Source§

impl Sum for u64

1.12.0 · Source§

impl Sum for u128

1.12.0 · Source§

impl Sum for usize

Source§

impl Sum for BigInt

Source§

impl Sum for Number

§

impl Sum for f32_be

§

impl Sum for f32_le

§

impl Sum for f64_be

§

impl Sum for f64_le

§

impl Sum for i16_be

§

impl Sum for i16_le

§

impl Sum for i32_be

§

impl Sum for i32_le

§

impl Sum for i64_be

§

impl Sum for i64_le

§

impl Sum for i128_be

§

impl Sum for i128_le

§

impl Sum for u16_be

§

impl Sum for u16_le

§

impl Sum for u32_be

§

impl Sum for u32_le

§

impl Sum for u64_be

§

impl Sum for u64_le

§

impl Sum for u128_be

§

impl Sum for u128_le

§

impl Sum for f32_ube

§

impl Sum for f32_ule

§

impl Sum for f64_ube

§

impl Sum for f64_ule

§

impl Sum for i16_ube

§

impl Sum for i16_ule

§

impl Sum for i32_ube

§

impl Sum for i32_ule

§

impl Sum for i64_ube

§

impl Sum for i64_ule

§

impl Sum for i128_ube

§

impl Sum for i128_ule

§

impl Sum for u16_ube

§

impl Sum for u16_ule

§

impl Sum for u32_ube

§

impl Sum for u32_ule

§

impl Sum for u64_ube

§

impl Sum for u64_ule

§

impl Sum for u128_ube

§

impl Sum for u128_ule

1.14.0 · Source§

impl Sum for Wrapping<i8>

1.14.0 · Source§

impl Sum for Wrapping<i16>

1.14.0 · Source§

impl Sum for Wrapping<i32>

1.14.0 · Source§

impl Sum for Wrapping<i64>

1.14.0 · Source§

impl Sum for Wrapping<i128>

1.14.0 · Source§

impl Sum for Wrapping<isize>

1.14.0 · Source§

impl Sum for Wrapping<u8>

1.14.0 · Source§

impl Sum for Wrapping<u16>

1.14.0 · Source§

impl Sum for Wrapping<u32>

1.14.0 · Source§

impl Sum for Wrapping<u64>

1.14.0 · Source§

impl Sum for Wrapping<u128>

1.14.0 · Source§

impl Sum for Wrapping<usize>

1.16.0 · Source§

impl Sum for Duration

Source§

impl Sum for Mat3

Source§

impl Sum for Mat2

Source§

impl Sum for Mat3A

Source§

impl Sum for Mat4

Source§

impl Sum for Quat

Source§

impl Sum for Vec3A

Source§

impl Sum for Vec4

Source§

impl Sum for Vec2

Source§

impl Sum for Vec3

Source§

impl Sum for DMat2

Source§

impl Sum for DMat3

Source§

impl Sum for DMat4

Source§

impl Sum for DQuat

Source§

impl Sum for DVec2

Source§

impl Sum for DVec3

Source§

impl Sum for DVec4

Source§

impl Sum for I8Vec2

Source§

impl Sum for I8Vec3

Source§

impl Sum for I8Vec4

Source§

impl Sum for I16Vec2

Source§

impl Sum for I16Vec3

Source§

impl Sum for I16Vec4

Source§

impl Sum for IVec2

Source§

impl Sum for IVec3

Source§

impl Sum for IVec4

Source§

impl Sum for I64Vec2

Source§

impl Sum for I64Vec3

Source§

impl Sum for I64Vec4

Source§

impl Sum for U8Vec2

Source§

impl Sum for U8Vec3

Source§

impl Sum for U8Vec4

Source§

impl Sum for U16Vec2

Source§

impl Sum for U16Vec3

Source§

impl Sum for U16Vec4

Source§

impl Sum for UVec2

Source§

impl Sum for UVec3

Source§

impl Sum for UVec4

Source§

impl Sum for U64Vec2

Source§

impl Sum for U64Vec3

Source§

impl Sum for U64Vec4

1.12.0 · Source§

impl<'a> Sum<&'a f32> for f32

1.12.0 · Source§

impl<'a> Sum<&'a f64> for f64

1.12.0 · Source§

impl<'a> Sum<&'a i8> for i8

1.12.0 · Source§

impl<'a> Sum<&'a i16> for i16

1.12.0 · Source§

impl<'a> Sum<&'a i32> for i32

1.12.0 · Source§

impl<'a> Sum<&'a i64> for i64

1.12.0 · Source§

impl<'a> Sum<&'a i128> for i128

1.12.0 · Source§

impl<'a> Sum<&'a isize> for isize

1.12.0 · Source§

impl<'a> Sum<&'a u8> for u8

1.12.0 · Source§

impl<'a> Sum<&'a u16> for u16

1.12.0 · Source§

impl<'a> Sum<&'a u32> for u32

1.12.0 · Source§

impl<'a> Sum<&'a u64> for u64

1.12.0 · Source§

impl<'a> Sum<&'a u128> for u128

1.12.0 · Source§

impl<'a> Sum<&'a usize> for usize

Source§

impl<'a> Sum<&'a BigInt> for BigInt

Source§

impl<'a> Sum<&'a Number> for Number

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<i8>> for Wrapping<i8>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<i16>> for Wrapping<i16>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<i32>> for Wrapping<i32>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<i64>> for Wrapping<i64>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<i128>> for Wrapping<i128>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<isize>> for Wrapping<isize>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<u8>> for Wrapping<u8>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<u16>> for Wrapping<u16>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<u32>> for Wrapping<u32>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<u64>> for Wrapping<u64>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<u128>> for Wrapping<u128>

1.14.0 · Source§

impl<'a> Sum<&'a Wrapping<usize>> for Wrapping<usize>

1.16.0 · Source§

impl<'a> Sum<&'a Duration> for Duration

Source§

impl<'a> Sum<&'a Mat3> for Mat3

Source§

impl<'a> Sum<&'a Mat2> for Mat2

Source§

impl<'a> Sum<&'a Mat3A> for Mat3A

Source§

impl<'a> Sum<&'a Mat4> for Mat4

Source§

impl<'a> Sum<&'a Quat> for Quat

Source§

impl<'a> Sum<&'a Vec3A> for Vec3A

Source§

impl<'a> Sum<&'a Vec4> for Vec4

Source§

impl<'a> Sum<&'a Vec2> for Vec2

Source§

impl<'a> Sum<&'a Vec3> for Vec3

Source§

impl<'a> Sum<&'a DMat2> for DMat2

Source§

impl<'a> Sum<&'a DMat3> for DMat3

Source§

impl<'a> Sum<&'a DMat4> for DMat4

Source§

impl<'a> Sum<&'a DQuat> for DQuat

Source§

impl<'a> Sum<&'a DVec2> for DVec2

Source§

impl<'a> Sum<&'a DVec3> for DVec3

Source§

impl<'a> Sum<&'a DVec4> for DVec4

Source§

impl<'a> Sum<&'a I8Vec2> for I8Vec2

Source§

impl<'a> Sum<&'a I8Vec3> for I8Vec3

Source§

impl<'a> Sum<&'a I8Vec4> for I8Vec4

Source§

impl<'a> Sum<&'a I16Vec2> for I16Vec2

Source§

impl<'a> Sum<&'a I16Vec3> for I16Vec3

Source§

impl<'a> Sum<&'a I16Vec4> for I16Vec4

Source§

impl<'a> Sum<&'a IVec2> for IVec2

Source§

impl<'a> Sum<&'a IVec3> for IVec3

Source§

impl<'a> Sum<&'a IVec4> for IVec4

Source§

impl<'a> Sum<&'a I64Vec2> for I64Vec2

Source§

impl<'a> Sum<&'a I64Vec3> for I64Vec3

Source§

impl<'a> Sum<&'a I64Vec4> for I64Vec4

Source§

impl<'a> Sum<&'a U8Vec2> for U8Vec2

Source§

impl<'a> Sum<&'a U8Vec3> for U8Vec3

Source§

impl<'a> Sum<&'a U8Vec4> for U8Vec4

Source§

impl<'a> Sum<&'a U16Vec2> for U16Vec2

Source§

impl<'a> Sum<&'a U16Vec3> for U16Vec3

Source§

impl<'a> Sum<&'a U16Vec4> for U16Vec4

Source§

impl<'a> Sum<&'a UVec2> for UVec2

Source§

impl<'a> Sum<&'a UVec3> for UVec3

Source§

impl<'a> Sum<&'a UVec4> for UVec4

Source§

impl<'a> Sum<&'a U64Vec2> for U64Vec2

Source§

impl<'a> Sum<&'a U64Vec3> for U64Vec3

Source§

impl<'a> Sum<&'a U64Vec4> for U64Vec4

Source§

impl<'a, const N: usize> Sum<&'a Simd<f32, N>> for Simd<f32, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<f64, N>> for Simd<f64, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<i8, N>> for Simd<i8, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<i16, N>> for Simd<i16, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<i32, N>> for Simd<i32, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<i64, N>> for Simd<i64, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<isize, N>> for Simd<isize, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<u8, N>> for Simd<u8, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<u16, N>> for Simd<u16, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<u32, N>> for Simd<u32, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<u64, N>> for Simd<u64, N>

Source§

impl<'a, const N: usize> Sum<&'a Simd<usize, N>> for Simd<usize, N>

§

impl<RHS> Sum<RHS> for f32x4
where f32x4: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for f64x2
where f64x2: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for f64x4
where f64x4: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i8x16
where i8x16: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i8x32
where i8x32: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i16x8
where i16x8: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i16x16
where i16x16: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i32x4
where i32x4: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i32x8
where i32x8: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i64x2
where i64x2: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for i64x4
where i64x4: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u8x16
where u8x16: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u16x8
where u16x8: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u16x16
where u16x16: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u32x4
where u32x4: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u32x8
where u32x8: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u64x2
where u64x2: AddAssign<RHS>,

§

impl<RHS> Sum<RHS> for u64x4
where u64x4: AddAssign<RHS>,

1.37.0 · Source§

impl<T, U> Sum<Option<U>> for Option<T>
where T: Sum<U>,

1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where T: Sum<U>,

Source§

impl<const N: usize> Sum for Simd<f32, N>

Source§

impl<const N: usize> Sum for Simd<f64, N>

Source§

impl<const N: usize> Sum for Simd<i8, N>

Source§

impl<const N: usize> Sum for Simd<i16, N>

Source§

impl<const N: usize> Sum for Simd<i32, N>

Source§

impl<const N: usize> Sum for Simd<i64, N>

Source§

impl<const N: usize> Sum for Simd<isize, N>

Source§

impl<const N: usize> Sum for Simd<u8, N>

Source§

impl<const N: usize> Sum for Simd<u16, N>

Source§

impl<const N: usize> Sum for Simd<u32, N>

Source§

impl<const N: usize> Sum for Simd<u64, N>

Source§

impl<const N: usize> Sum for Simd<usize, N>