pub struct AliasMap {
pub entries: BTreeMap<String, AliasEntry>,
pub identifiers: usize,
pub canonical_zones: usize,
pub links: usize,
pub duplicated_byte_links: usize,
}Expand description
The whole manifest: a deterministic (sorted) map of identifiers plus summary counts.
Fields§
§entries: BTreeMap<String, AliasEntry>Identifier → entry, ordered by name for deterministic output.
identifiers: usize§canonical_zones: usize§links: usize§duplicated_byte_links: usizeLinks materialised as byte copies (i.e. where the same TZif bytes exist under two names). This is the figure jiff#258 was asking to make visible.
Implementations§
Source§impl AliasMap
impl AliasMap
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate the alias map’s internal consistency (T12.4c). Guarantees that every Link
entry “corresponds to a materialised link/copy” of a real compiled zone:
- every
Link’stargetis present in this map as aZoneentry (no dangling alias — “missing target fails”; a link that resolved to another link, or to nothing, never gets here becausebuildrecords the resolved canonical zone); - the
Link’s recordedtarget_sha256is non-empty and equals that zone’s hash (the alias genuinely names those exact bytes — the jiff#258 duplication is real, not asserted); - no entry is a self-link (
name == target) —resolve_link_targetalready rejects self-links/cycles upstream (they are skipped inplan::runand countedfailedin the link profile), so this is the alias-map-level guard that keeps that coverage honest; - the summary counts (
canonical_zones/links/identifiers) agree with the entries.
build calls this before returning, so any AliasMap handed out is already consistent.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AliasMap
impl RefUnwindSafe for AliasMap
impl Send for AliasMap
impl Sync for AliasMap
impl Unpin for AliasMap
impl UnsafeUnpin for AliasMap
impl UnwindSafe for AliasMap
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