qsym2/drivers/mod.rs
1//! Drivers to carry out QSym² functionalities.
2
3use anyhow;
4
5// pub mod molecule_symmetrisation;
6pub mod molecule_symmetrisation_bootstrap;
7pub mod projection;
8pub mod representation_analysis;
9pub mod symmetry_group_detection;
10
11// =================
12// Trait definitions
13// =================
14
15/// Trait defining behaviours of `QSym2` drivers.
16pub trait QSym2Driver {
17    /// The type of the parameter structure controlling the driver.
18    type Params;
19
20    /// The type of the successful outcome when executing the driver.
21    type Outcome;
22
23    /// Executes the driver and stores the result internally.
24    fn run(&mut self) -> Result<(), anyhow::Error>;
25
26    /// Returns the result of the driver execution.
27    fn result(&self) -> Result<&Self::Outcome, anyhow::Error>;
28}