Trait IteratorSum

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

๐Ÿ”„ core Represents types that can be created by summing up an iterator.

Re-exported from core::iter:: Sumโ†’IteratorSum.


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 FPoint

ยง

impl Sum for devela::_dep::sdl2::rect::Point

ยง

impl Sum for devela::_dep::sdl3::rect::Point

1.16.0 ยท Sourceยง

impl Sum for Duration

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>

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.16.0 ยท Sourceยง

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

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>

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>