yeshenyue2017/web-discovery-kit/sitemap does not have a README file

    SitemapDecoder

    pub struct SitemapDecoder {
    // private fields
    }

    SitemapInspection

    pub(all) struct SitemapInspection {
    kind : SitemapKind
    entry_count : Int
    unique_locations : Int
    duplicate_locations : Int
    location_bytes : Int
    host : String?
    lastmod_entries : Int
    changefreq_entries : Int
    priority_entries : Int
    priority_total : Double
    priority_min : Double?
    priority_max : Double?
    priority_average : Double?
    canonical_bytes : Int
    } derive(Eq,
    Debug
    )

    A stable, offline summary of a validated Sitemap document.

    host is the normalized lower-case hostname shared by the entries (or None for an empty document). canonical_bytes is the UTF-8 byte length of this package's deterministic serialize representation, not the byte length of a source document that may contain different whitespace.

    SitemapKind

    pub enum SitemapKind {
    UrlSetDocument
    SitemapIndexDocument
    } derive(Eq,
    Debug
    )

    The top-level document kind observed by inspect_document.

    SitemapPartitionLimits

    pub(all) struct SitemapPartitionLimits {
    max_entries : Int
    max_document_bytes : Int
    } derive(Eq,
    Debug
    )

    Limits for deterministic Sitemap partitioning. Both limits are inclusive: a shard may contain exactly max_entries entries and exactly max_document_bytes UTF-8 bytes in canonical serialized form.

    Constructing this value is infallible to support configuration loading; partition_urls and partition_refs reject invalid values before reading their input.

    SitemapPartitionLimits::new

    fn SitemapPartitionLimits::new(max_entries? : Int, max_document_bytes? : Int) -> SitemapPartitionLimits

    Construct partition limits. Values are checked by the partition operation, allowing callers to collect all configuration before beginning work.

    SitemapShard

    pub(all) struct SitemapShard {
    document :
    SitemapDocument

    entry_count : Int
    serialized_bytes : Int
    } derive(Eq,
    Debug
    )

    One deterministic output shard. serialized_bytes is exact for serialize(document) and can be recorded alongside the output without a second serialization pass.

    inspect_document

    Produce protocol statistics for a constructed document. The operation first applies validate_document; therefore every reported value has passed the same semantic checks as a parser or serializer. Duplicate locations are reported rather than rejected because duplicate detection is operational evidence, not a Sitemap XML validity failure.

    parse

    Parse a complete document by using the same incremental state machine.

    partition_refs

    Greedily partition Sitemap-index references in input order. The planner has the same deterministic count and byte guarantees as partition_urls, while retaining the index document kind in every emitted shard.

    partition_urls

    Greedily partition URL entries in input order using both an entry-count and canonical UTF-8 byte ceiling. No entry is reordered, dropped, or duplicated. A single valid entry that cannot fit the configured byte ceiling raises LimitExceeded instead of producing a non-conformant shard.

    serialize

    Serialize a validated Sitemap document in a stable compactly-indented XML representation. All text fields are escaped and output always has the canonical Sitemap namespace.

    split_urls

    Split a URL set in input order. The caller can choose a smaller limit for transport or CI; values above the protocol maximum are rejected.

    validate_document

    Validate a constructed Sitemap document without reparsing XML. This checks the protocol entry limit, canonical serialized size, one-host constraint, absolute HTTP(S) locations, and every optional protocol field.