use alloc::vec::Vec;
use core::iter::Peekable;
use crate::{MolecularFormulaMetadata, errors::ParserError, parsable::ParsableMolecularTree};
pub(crate) trait ParsableFormula: MolecularFormulaMetadata {
type StartOutput;
type Tree: ParsableMolecularTree<Self::Count>;
fn from_parsed(
start_output: Self::StartOutput,
mixtures: Vec<(Self::Count, Self::Tree)>,
) -> Result<Self, ParserError>;
fn on_start<J>(chars: &mut Peekable<J>) -> Result<Self::StartOutput, ParserError>
where
J: Iterator<Item = char>;
}