pub struct Aggregate {
pub reports: Vec<Report>,
}Expand description
A combined view across multiple DMARC aggregate reports.
Each underlying Report retains its own metadata and policy_published
— there is intentionally no synthetic merged report, since fields like
org_name, report_id, and date_range cannot be honestly combined.
Use Aggregate::records to iterate every record paired with the report
it came from.
Fields§
§reports: Vec<Report>The reports that make up the aggregate, in the order they were added.
Implementations§
Source§impl Aggregate
impl Aggregate
Sourcepub fn from_reports(reports: Vec<Report>) -> Self
pub fn from_reports(reports: Vec<Report>) -> Self
Build an aggregate from a collection of reports.
Sourcepub fn records(&self) -> impl Iterator<Item = (&Report, &Record)>
pub fn records(&self) -> impl Iterator<Item = (&Report, &Record)>
Iterator over every record across every report, paired with the
Report it came from.
Sourcepub fn total_messages(&self) -> u64
pub fn total_messages(&self) -> u64
Sum of row.count across every record.
Trait Implementations§
impl StructuralPartialEq for Aggregate
Auto Trait Implementations§
impl Freeze for Aggregate
impl RefUnwindSafe for Aggregate
impl Send for Aggregate
impl Sync for Aggregate
impl Unpin for Aggregate
impl UnsafeUnpin for Aggregate
impl UnwindSafe for Aggregate
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