Skip to main content

StructuralReport

Struct StructuralReport 

Source
pub struct StructuralReport {
    pub tzdb_version: Option<String>,
    pub reference_zic: String,
    pub zones: Vec<ZoneShape>,
    pub errors: Vec<ZoneError>,
    pub timecnt_delta_total: i64,
}
Expand description

The complete structural-parity inventory for one source file.

Fields§

§tzdb_version: Option<String>§reference_zic: String§zones: Vec<ZoneShape>

Per-zone comparisons, sorted by name.

§errors: Vec<ZoneError>

Zones skipped because one side errored, sorted by name.

§timecnt_delta_total: i64

Net extra explicit transitions zic-rs emits over reference zic (Σ over slim/fat zones; negative would mean reference is fatter). A pure measure of the slim/fat gap.

Implementations§

Source§

impl StructuralReport

Source

pub fn class_counts(&self) -> BTreeMap<ParityClass, usize>

Count of zones in each class, in the taxonomy’s canonical order.

Source

pub fn zones_compared(&self) -> usize

Zones whose behaviour-relevant emitted structure — the TZif version byte and the POSIX footer — matches reference zic exactly. Computed directly (not by class) so a zone that is mixed only on benign dimensions (slim/fat timecnt + charcnt packing) still counts as version+footer-clean. This is the honest “structurally drop-in modulo slim/fat + abbreviation packing” count.

Source

pub fn to_text(&self) -> String

Source

pub fn to_json(&self) -> String

Trait Implementations§

Source§

impl Debug for StructuralReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.