Skip to main content

dpp_calc/co2e/
mod.rs

1//! Cradle-to-gate CO₂e calculator and Battery CFB stub.
2//!
3//! The primary entry point is [`calculate`], which computes the production-stage
4//! footprint from a bill of materials and manufacturing energy using a
5//! caller-supplied [`Co2eRuleset`]. [`cfb`] is a stub gated on Phase 2 data licensing.
6//!
7//! ## Module layout (five-file methodology convention)
8//!
9//! - [`parameters`] — typed inputs ([`Co2eInputs`], [`MaterialFootprint`]).
10//! - [`thresholds`] — the [`Co2eRuleset`] trait and [`CradleToGateRuleset`] impl.
11//! - [`calculator`] — the [`calculate`] algorithm and its output types.
12//! - `golden_vectors` — `#[cfg(test)]` regression tests.
13//! - [`cfb`] — battery CFB stub; [`gwp_factors`] — embeddable GWP100 table.
14
15pub mod calculator;
16pub mod cfb;
17pub mod gwp_factors;
18pub mod parameters;
19pub mod thresholds;
20
21#[cfg(test)]
22mod golden_vectors;
23
24pub use calculator::{Co2eResult, LifecycleStage, MaterialLineResult, calculate};
25pub use parameters::{Co2eInputs, MaterialFootprint};
26pub use thresholds::{Co2eRuleset, CradleToGateRuleset};