Skip to main content

Module photo

Module photo 

Source
Expand description

uor_addr::schema::photo — Photo content-addressing (ARCHITECTURE.md “Schema-pinned descendants” § uor-addr-photo).

Schema-pinned descendant of crate::json. Imports schema.org’s Photograph type — the host-boundary parser admits only JSON-LD values that conform to schema.org’s published Photograph taxon. ψ-pipeline and κ-derivation are inherited from the JSON realization without modification.

Per UOR’s schema-import discipline (per the UOR-Framework wiki), this module does not define a custom photo schema; it imports https://schema.org/Photograph and applies the schema-validation rules schema.org publishes.

§no_std + no_alloc

Schema admission walks the parsed crate::json::JsonValue’s tagged bytes via crate::json::JsonValueRef. There is no intermediate serde_json::Value; no allocator is touched.

§Authoritative sources

§Admission predicate (the schema.org/Photograph contract)

The input must be a JSON-LD object satisfying:

  1. @context is "https://schema.org" or "http://schema.org".
  2. @type is "Photograph".
  3. contentUrl — string URL.
  4. creator — string OR object with @type in {Person, Organization} and a name string.

Structs§

PhotoValue
Typed Photo content-addressing input. Wraps a JsonValue whose runtime JSON structure conforms to schema.org/Photograph.

Enums§

AddressFailure
Failure modes from address.

Constants§

PHOTOGRAPH_TYPE
schema.org Photograph type IRI fragment (used in the @type field).
REQUIRED_PROPERTIES
Required properties for a schema.org/Photograph instance.
SCHEMA_ORG_CONTEXTS
schema.org canonical context IRIs (HTTP + HTTPS variants).

Functions§

address
Mint a κ-label over a schema.org/Photograph-admitted JSON value. The κ-label is byte-identical to crate::json::address’s κ-label for the same JSON input — schema admission applies at parse time per SD2 Grounding, not in the ψ-pipeline.
address_blake3
As address, but binds the blake3 σ-axis (crate::hash). Schema admission is identical; only the κ-derivation hash differs.
address_keccak256
As address, but binds the keccak256 σ-axis (crate::hash). Schema admission is identical; only the κ-derivation hash differs.
address_sha3_256
As address, but binds the sha3_256 σ-axis (crate::hash). Schema admission is identical; only the κ-derivation hash differs.
address_sha512
As address, but binds the sha512 σ-axis (crate::hash).
canonicalize
Available only under the alloc feature. Canonical-bytes accessor — the schema admission applies at ingress; the canonical bytes are JCS-RFC8785 + NFC per the JSON realization.