pub struct ReportContext<'a> {
pub school: &'a School,
pub plan: &'a Plan,
pub degree: Option<&'a Degree>,
pub metrics: &'a CurriculumMetrics,
pub summary: &'a CurriculumSummary,
pub dag: &'a DAG,
pub term_plan: &'a TermPlan,
}Expand description
Data context for report generation
This struct aggregates all data needed to render a curriculum report, providing a single source of truth for templates.
Fields§
§school: &'a SchoolSchool containing course catalog
plan: &'a PlanCurriculum plan being reported
degree: Option<&'a Degree>Associated degree (if found)
metrics: &'a CurriculumMetricsComputed metrics for courses
summary: &'a CurriculumSummarySummary statistics
dag: &'a DAGPrerequisite DAG
term_plan: &'a TermPlanTerm-by-term course schedule
Implementations§
Source§impl<'a> ReportContext<'a>
impl<'a> ReportContext<'a>
Sourcepub const fn new(
school: &'a School,
plan: &'a Plan,
degree: Option<&'a Degree>,
metrics: &'a CurriculumMetrics,
summary: &'a CurriculumSummary,
dag: &'a DAG,
term_plan: &'a TermPlan,
) -> Self
pub const fn new( school: &'a School, plan: &'a Plan, degree: Option<&'a Degree>, metrics: &'a CurriculumMetrics, summary: &'a CurriculumSummary, dag: &'a DAG, term_plan: &'a TermPlan, ) -> Self
Create a new report context
Sourcepub fn institution_name(&self) -> &str
pub fn institution_name(&self) -> &str
Get the institution name
Sourcepub fn degree_name(&self) -> String
pub fn degree_name(&self) -> String
Get the degree name or a default
Sourcepub fn system_type(&self) -> &str
pub fn system_type(&self) -> &str
Get the system type (semester/quarter)
Sourcepub fn total_credits(&self) -> f32
pub fn total_credits(&self) -> f32
Calculate total credit hours
Sourcepub const fn course_count(&self) -> usize
pub const fn course_count(&self) -> usize
Get course count
Trait Implementations§
Source§impl<'a> Clone for ReportContext<'a>
impl<'a> Clone for ReportContext<'a>
Source§fn clone(&self) -> ReportContext<'a>
fn clone(&self) -> ReportContext<'a>
Returns a duplicate of the value. Read more
1.0.0 · 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<'a> Freeze for ReportContext<'a>
impl<'a> RefUnwindSafe for ReportContext<'a>
impl<'a> Send for ReportContext<'a>
impl<'a> Sync for ReportContext<'a>
impl<'a> Unpin for ReportContext<'a>
impl<'a> UnwindSafe for ReportContext<'a>
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