Skip to main content

canonicalize_with

Function canonicalize_with 

Source
pub fn canonicalize_with<W, F>(
    doc: &Document,
    opts: &CanonicalizeOptions,
    out: &mut W,
    is_visible: F,
) -> Result<(), Error>
where W: Write, F: Fn(VisitTarget<'_, '_>) -> bool,
Expand description

Stream the canonical form of an entire Document into out.

Bytes are written incrementally as the walker produces them, so callers wiring a hash context (XML-DSig) or a network sink see each chunk without ever materializing the full canonical form.

is_visible filters which nodes and attributes appear in the output. See VisitTarget for semantics; pass include_all to emit everything.