use super::{FilterTypedKeyValuePairs, Token, TokenReader, TokenType};
pub trait IteratorExt: Iterator<Item = Token> {
fn filter_key_value_by_type(self, token_type: TokenType) -> FilterTypedKeyValuePairs<Self>
where
Self: Sized,
{
FilterTypedKeyValuePairs::new(self, token_type)
}
fn reader(self, source: Option<&str>) -> TokenReader<Self>
where
Self: Sized,
{
TokenReader::new(self, source)
}
}
impl<T: Iterator<Item = Token>> IteratorExt for T {}