domain capa

domain-privacy-research

Privacy research database for tracking website fingerprinting, behavioral surveillance, and tracker exposure over time

Privacy research database for tracking website fingerprinting, behavioral surveillance, and tracker exposure over time

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/privacy-research
Edition2021
Targetsdomain_privacy_research
Public items34 across 5 modules
Tests5

What it is for

This crate does not document itself. No //! block on its entry point. The facts below are complete; the reason this crate exists is not written down anywhere, and belongs in src/lib.rs rather than here.

Capabilities

PrivacyResearchError

_No module-level documentation is present in the source._

Item
pub enum PrivacyResearchError

RescanAllJob

_No module-level documentation is present in the source._

Item
pub struct RescanAllJob

ScanBatchJob

_No module-level documentation is present in the source._

Item
pub struct ScanBatchJob

ScanSiteJob

_No module-level documentation is present in the source._

Item
pub struct ScanSiteJob

jobs::job_types (other)

_No module-level documentation is present in the source._

Item
pub const SCAN_SITE: & str
pub const SCAN_BATCH: & str
pub const RESCAN_ALL: & str
pub const REFRESH_VIEWS: & str

FingerprintingTechnique

_No module-level documentation is present in the source._

Item
pub struct FingerprintingTechnique

LatestScanSummary

_No module-level documentation is present in the source._

Item
pub struct LatestScanSummary

NewScan

_No module-level documentation is present in the source._

Item
pub struct NewScan

NewSite

_No module-level documentation is present in the source._

Item
pub struct NewSite

PrivacyScan

_No module-level documentation is present in the source._

Item
pub struct PrivacyScan

Site

_No module-level documentation is present in the source._

Item
pub struct Site

TrackerDomain

_No module-level documentation is present in the source._

Item
pub struct TrackerDomain

TrackerEntity

_No module-level documentation is present in the source._

Item
pub struct TrackerEntity

CategoryScore

_No module-level documentation is present in the source._

Item
pub struct CategoryScore

FanOutStats

_No module-level documentation is present in the source._

Item
pub struct FanOutStats

PrivacyResearchStore:PrivacyResearchStore

_No module-level documentation is present in the source._

Item
pub struct PrivacyResearchStore

PrivacyResearchStore:fan

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn fan_out_scan_data(& self, scan_id : Uuid, report : & serde_json::Value,) -> Result <FanOutStats, PrivacyResearchError>

PrivacyResearchStore:get

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn get_site_by_host(& self, host : & str) -> Result <Option <Site>, PrivacyResearchError>

PrivacyResearchStore:insert

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn insert_scan(& self, input : & NewScan) -> Result <Uuid, PrivacyResearchError>

PrivacyResearchStore:list

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn list_sites(& self) -> Result <Vec <Site>, PrivacyResearchError>

PrivacyResearchStore:most

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn most_common_trackers(& self, limit : i64,) -> Result <Vec <TrackerFrequency>, PrivacyResearchError>
PrivacyResearchStore :: async fn most_common_fingerprinting(& self, limit : i64,) -> Result <Vec <TechniqueFrequency>, PrivacyResearchError>

PrivacyResearchStore:new

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: fn new(pool : PgPool) -> Self

PrivacyResearchStore:refresh

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn refresh_latest_scans(& self) -> Result <(), PrivacyResearchError>

PrivacyResearchStore:scores

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn scores_by_category(& self) -> Result <Vec <CategoryScore>, PrivacyResearchError>

PrivacyResearchStore:site

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn site_history(& self, site_id : Uuid, limit : i64,) -> Result <Vec <ScanHistoryEntry>, PrivacyResearchError>

PrivacyResearchStore:upsert

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn upsert_site(& self, input : & NewSite) -> Result <Site, PrivacyResearchError>

PrivacyResearchStore:worst

_No module-level documentation is present in the source._

Item
PrivacyResearchStore :: async fn worst_sites(& self, limit : i64,) -> Result <Vec <LatestScanSummary>, PrivacyResearchError>

ScanHistoryEntry

_No module-level documentation is present in the source._

Item
pub struct ScanHistoryEntry

TechniqueFrequency

_No module-level documentation is present in the source._

Item
pub struct TechniqueFrequency

TrackerFrequency

_No module-level documentation is present in the source._

Item
pub struct TrackerFrequency

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

domain_privacy_research

flowchart TD
  n_domain_privacy_research["domain_privacy_research"]
  n_domain_privacy_research --> n_error["error"]
  n_domain_privacy_research --> n_jobs["jobs"]
  n_jobs --> n_jobs__job_types["job_types"]
  n_domain_privacy_research --> n_models["models"]
  n_domain_privacy_research --> n_store["store"]

Public surface

`error`

ItemWhat it is
pub enum PrivacyResearchError

`jobs`

ItemWhat it is
pub struct ScanSiteJobJob payload for scanning a single site.
pub struct ScanBatchJobJob payload for scanning a batch of sites from a list.
pub struct RescanAllJobJob payload for rescanning all known sites.

`jobs::job_types`

ItemWhat it is
pub const SCAN_SITE: & str
pub const SCAN_BATCH: & str
pub const RESCAN_ALL: & str
pub const REFRESH_VIEWS: & str

`models`

ItemWhat it is
pub struct SiteA canonical website identity for privacy research.
pub struct NewSiteInput for creating a new site.
pub struct TrackerEntityA company/organization that tracks users across websites.
pub struct TrackerDomainA domain owned by a tracker entity.
pub struct FingerprintingTechniqueA known fingerprinting technique.
pub struct PrivacyScanA single privacy scan run — immutable fact record.
pub struct NewScanInput for storing a new scan.
pub struct LatestScanSummaryLatest scan summary per site (from materialized view).

`store`

ItemWhat it is
pub struct PrivacyResearchStoreDatabase operations for privacy research data.
PrivacyResearchStore :: fn new(pool : PgPool) -> Self
PrivacyResearchStore :: async fn upsert_site(& self, input : & NewSite) -> Result <Site, PrivacyResearchError>
PrivacyResearchStore :: async fn get_site_by_host(& self, host : & str) -> Result <Option <Site>, PrivacyResearchError>
PrivacyResearchStore :: async fn list_sites(& self) -> Result <Vec <Site>, PrivacyResearchError>
PrivacyResearchStore :: async fn insert_scan(& self, input : & NewScan) -> Result <Uuid, PrivacyResearchError>
PrivacyResearchStore :: async fn worst_sites(& self, limit : i64,) -> Result <Vec <LatestScanSummary>, PrivacyResearchError>Get the worst-scoring sites (latest scan per site).
PrivacyResearchStore :: async fn site_history(& self, site_id : Uuid, limit : i64,) -> Result <Vec <ScanHistoryEntry>, PrivacyResearchError>Get privacy score history for a site over time.
PrivacyResearchStore :: async fn most_common_trackers(& self, limit : i64,) -> Result <Vec <TrackerFrequency>, PrivacyResearchError>Get most common trackers across all scanned sites.
PrivacyResearchStore :: async fn most_common_fingerprinting(& self, limit : i64,) -> Result <Vec <TechniqueFrequency>, PrivacyResearchError>Get most common fingerprinting techniques across sites.
PrivacyResearchStore :: async fn scores_by_category(& self) -> Result <Vec <CategoryScore>, PrivacyResearchError>Get average privacy score by site category.
PrivacyResearchStore :: async fn fan_out_scan_data(& self, scan_id : Uuid, report : & serde_json::Value,) -> Result <FanOutStats, PrivacyResearchError>Fan out JSONB report data into normalized child tables
PrivacyResearchStore :: async fn refresh_latest_scans(& self) -> Result <(), PrivacyResearchError>Refresh the materialized view (call after inserting new scans).
pub struct FanOutStatsStats from fan-out normalization.
pub struct TrackerFrequency
pub struct TechniqueFrequency
pub struct CategoryScore
pub struct ScanHistoryEntry

Re-exports. Exported here, defined elsewhere.

ExportDefined in
PrivacyResearchErrorerror::PrivacyResearchError
{CategoryScore,PrivacyResearchStore,TechniqueFrequency,TrackerFrequency}store::{CategoryScore,PrivacyResearchStore,TechniqueFrequency,TrackerFrequency}
{FingerprintingTechnique,LatestScanSummary,NewScan,NewSite,PrivacyScan,Site,TrackerDomain,TrackerEntity,}models::{FingerprintingTechnique,LatestScanSummary,NewScan,NewSite,PrivacyScan,Site,TrackerDomain,TrackerEntity,}
{job_types,RescanAllJob,ScanBatchJob,ScanSiteJob}jobs::{job_types,RescanAllJob,ScanBatchJob,ScanSiteJob}

Boundary

Reaches into foundation.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 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)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/privacy-research
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
thiserror^2noalways
tracing^0.1noalways
uuid^1v4, v7, serde, jsnoalways

Development. None.

Build. None.

Depended on by. 3 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_privacy_research["application-privacy-research"] -->|uses| SELF
  n_operations_privacy_scan_runner["operations-privacy-scan-runner"] -->|uses| SELF
  n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF
  SELF["domain-privacy-research"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

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

Targets

KindNameSource
libdomain_privacy_research`src/lib.rs`

Error model

Error typeNamed by
PrivacyResearchErrordeclared, no public signature returns it

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
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.

3 workspace crates depend on this one: application-privacy-research, operations-privacy-scan-runner, platform-privacy-scan-api.

Verification

KindCount
Unit tests5
Integration tests0
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
error100
jobs301
jobs::job_types401
models803
store601

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc2034
Public modules with a //! block05
pie showData
    title Public items with rustdoc
    "Documented" : 20
    "No rustdoc detected" : 14

Metrics

MetricValue
Rust source files5
Source lines942
Code lines824
Public API items34
Public modules5
Tests5
Examples0
Cargo features0
Direct runtime dependencies8
Workspace reverse dependencies3
pie showData
    title Public API by kind
    "constant" : 4
    "enum" : 1
    "method" : 12
    "struct" : 17
pie showData
    title Rust source composition
    "Code" : 824
    "Blank or comment" : 118

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 domain · Manual