Skip to main content

attach_retention_details

Function attach_retention_details 

Source
pub fn attach_retention_details(
    read: &[Diagnostic],
    emitted: &mut [Diagnostic],
    loss_code: &str,
) -> Result<(), Error>
Expand description

Add a parse-time retention inventory to an existing cross-format loss diagnostic.

A reader that keeps native data only in the retained source reports each such table or field as a diagnostic whose retention detail is original_source_only or original_mdb_only. When a later emission reports that loss under loss_code, this copies those details onto the loss diagnostic as source_inventory, so the inventory survives IR and cross-format output without the source bytes. The function is model neutral: it reads details only and never reconstructs source bytes.

ยงErrors

A diagnostic record exceeds the shared record limits.