use std::iter::FusedIterator;
use crate::system::f64::MassOverCharge;
pub trait PeakSpectrum:
Extend<Self::PeakType>
+ IntoIterator<Item = Self::PeakType>
+ std::ops::Index<usize, Output = Self::PeakType>
{
type PeakType;
type Iter<'a>: DoubleEndedIterator + ExactSizeIterator + FusedIterator
where
Self: 'a;
fn binary_search(&self, low: MassOverCharge, high: MassOverCharge) -> &[Self::PeakType];
fn spectrum(&self) -> Self::Iter<'_>;
fn add_peak(&mut self, item: Self::PeakType);
}