use crateCollectorBase;
/// Types that provide a [`Collector`] to calculate the sum of all collected items.
///
/// Implementors should provide an "identity value" as the [`Output`];
/// in other words, the value produced by `T::adding().finish()`.
/// For example, the identity value for a collector that adds integers is `0`.
///
/// Typically, the [`Output`] type is the same as the implementing type.
///
/// See its implementors for examples.
///
/// This trait corresponds to [`std::iter::Sum`].
///
/// [`Collector`]: crate::collector::Collector
/// [`Output`]: CollectorBase::Output