pub struct Declarations {
pub methodology: EconomicsMethodology,
pub suites: BTreeMap<String, EconomicsSuite>,
pub tasks: BTreeMap<String, EconomicsTask>,
}Expand description
Every declaration of the economics subsystem, read from DIR.
Only load builds one, and only when every file it names was read: a value of this
type is a complete benchmark, never one with a task silently missing. Suites and tasks
are keyed by their declared id, so iteration order is the id order, not the file order.
use majordomus_cli::economics::{load, Declarations};
let dir = tempfile::tempdir().unwrap();
// a methodology and one live suite `pilot` declaring no task yet
let decl: Declarations = load(dir.path()).unwrap().expect("a methodology is declared");
assert_eq!(decl.methodology.version, 1);
assert_eq!(decl.suites.keys().collect::<Vec<_>>(), ["pilot"]);
assert!(decl.tasks.is_empty());Fields§
§methodology: EconomicsMethodologyThe methodology.
suites: BTreeMap<String, EconomicsSuite>The suites, by id.
tasks: BTreeMap<String, EconomicsTask>The tasks, by id.
Trait Implementations§
Source§impl Clone for Declarations
impl Clone for Declarations
Source§fn clone(&self) -> Declarations
fn clone(&self) -> Declarations
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Declarations
impl RefUnwindSafe for Declarations
impl Send for Declarations
impl Sync for Declarations
impl Unpin for Declarations
impl UnsafeUnpin for Declarations
impl UnwindSafe for Declarations
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more