pub struct Report {
pub defaults: Style,
pub groups: Vec<ReportGroup>,
}Expand description
Top-level report: block.
Fields§
§defaults: StyleCross-cutting style + metadata defaults declared via the
reserved defaults: mapping. Cascade into every group.
groups: Vec<ReportGroup>Groups in YAML declaration order. Each group’s name becomes a markdown section heading; items render in body order.
Implementations§
Source§impl Report
impl Report
Sourcepub fn items(&self) -> impl Iterator<Item = &ReportItem>
pub fn items(&self) -> impl Iterator<Item = &ReportItem>
Iterate every item across every group in declaration order.
Sourcepub fn find(&self, name: &str) -> Option<&ReportItem>
pub fn find(&self, name: &str) -> Option<&ReportItem>
Find an item by canonical name. Returns the first match in
declaration order. Names should be unique within a Report
(collisions are caught at parse time).
Sourcepub fn effective_style(&self, group: &ReportGroup, item: &ReportItem) -> Style
pub fn effective_style(&self, group: &ReportGroup, item: &ReportItem) -> Style
Resolve the effective style for one item, walking the cascade: report defaults → group defaults → item directives.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Report
impl<'de> Deserialize<'de> for Report
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
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