infrastructure capa

infrastructure-web-asset-discoverer

<img>/<link>/OG-image URL discovery from already-fetched HTML -- no storage, no download, no archival (Gate 0.5 rejected the source's HtmlArchive storage layer as an infrastructure-storage duplicate; this crate is the net-new discovery half only)

<img>/<link>/OG-image URL discovery from already-fetched HTML -- no storage, no download, no archival (Gate 0.5 rejected the source's HtmlArchive storage layer as an infrastructure-storage duplicate; this crate is the net-new discovery half only)

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/web-asset-discoverer
Edition2021
Targetsinfrastructure_web_asset_discoverer
Public items6 across 1 module
Tests15

What it is for

infrastructure-web-asset-discoverer -- <img>/<link>/OG-image URL discovery from already-fetched HTML, ported from plumber/src/extraction/discovery.rs::AssetDiscoverer.

This crate does exactly one thing: given an HTML document and its base URL, produce the list of asset URLs (<img src>/<img srcset>/ <picture><source srcset>, PDF/document <a href>, favicon/apple-touch <link rel>, and Open Graph / Twitter Card <meta> images) referenced by that document. It does not fetch, download, or store anything -- Gate 0.5 dedup (docs/userstories/sprint-3.46-plumber-harvest.md, crate table row 13) rejected the source's HtmlArchive storage layer (storage/html_archive.rs) as a duplicate of infrastructure-storage's date-sharded, content-addressed architecture. AssetDiscoverer itself -- the part of discovery.rs that parses URLs out of markup -- has no existing counterpart and is this crate's entire scope. The source file contained no download/storage code of its own (it only ever produced DiscoveredAsset { url, .. } values for some other module to act on), so this is a whole-file lift, not a partial extraction.

Not a foundation_web_analysis::Analyzer implementor, unlike most of its wave-2/3 siblings -- like infrastructure-web-contact-extractor, this is a standalone parsing utility. It takes HTML a caller already fetched (by whatever means -- typically infrastructure-fetcher's SafeHttpClient, the repo's SSRF-hardened client) and has no HTTP client dependency of its own.

Capabilities

AssetDiscoverer

<img>/<link>/OG-image URL discovery, ported from

Item
pub struct AssetDiscoverer
AssetDiscoverer :: fn discover(html : & str, base_url : & Url) -> AssetDiscovery

AssetDiscovery

<img>/<link>/OG-image URL discovery, ported from

Item
pub struct AssetDiscovery

AssetKind

<img>/<link>/OG-image URL discovery, ported from

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

DiscoveredAsset

<img>/<link>/OG-image URL discovery, ported from

Item
pub struct DiscoveredAsset

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

infrastructure_web_asset_discoverer

Public surface

`discoverer`

ItemWhat it is
pub enum AssetKindThe kind of asset a DiscoveredAsset resolves to
AssetKind :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::ResultRenders the source's original asset_type string, for callers that want the label rather than the enum (logging, serialization).
pub struct DiscoveredAssetOne asset URL discovered in an HTML document.
pub struct AssetDiscoveryResult of one AssetDiscoverer::discover pass.
pub struct AssetDiscovererDiscovers assets (images, PDFs, documents) referenced by an HTML document
AssetDiscoverer :: fn discover(html : & str, base_url : & Url) -> AssetDiscoveryExtract all asset URLs from html, resolved against base_url.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
{AssetDiscoverer,AssetDiscovery,AssetKind,DiscoveredAsset}discoverer::{AssetDiscoverer,AssetDiscovery,AssetKind,DiscoveredAsset}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/web-asset-discoverer
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
scraper^0.20noalways
url^2noalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libinfrastructure_web_asset_discoverer`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests15
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
discoverer400

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc66
Public modules with a //! block11
pie showData
    title Public items with rustdoc
    "Documented" : 6
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines567
Code lines393
Public API items6
Public modules1
Tests15
Examples0
Cargo features0
Direct runtime dependencies2
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 1
    "method" : 2
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 393
    "Blank or comment" : 174

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las infrastructure · Manual