application tier

application-cms

Forge CMS module — pages, posts, blog, media, attachments, backdrops, SEO, site_settings, translations, docs, downloads, search, taxonomy. Extracted from rust-cms-engine per sprint 56. SKELETON: full content extraction pending activation.

Forge CMS module — pages, posts, blog, media, attachments, backdrops, SEO, site_settings, translations, docs, downloads, search, taxonomy. Extracted from rust-cms-engine per sprint 56. SKELETON: full content extraction pending activation.

Tierapplication
Roleunclassified (baselined)
Pathcrates/application/cms
Edition2024
Targetsapplication_cms, old_resolver_unreachable, pg_async_variants, pg_blob_assets, pg_ingest_parity, pg_media_field_attachments, pg_module_settings, pg_negative_access_matrix, pg_p4_private_original, pg_pages, pg_renditions, pg_schema_mirror_guard
Public items590 across 88 modules
Tests430

What it is for

application-cms — Layer 3 module for CMS surfaces.

Sprint 56: real content extraction from rust-cms-engine. 22 service files moved (markdown, pages, posts, blog, cms, cms_admin, cms_versions, attachments x3, backdrops x3, media, site_settings, translations, docs, downloads, redirects, sitemap, categories, tags, search).

rust-cms-engine retains a re-export shim during transition so its internal callers (cms_admin, docs, pages_admin, etc.) keep resolving crate::services::X to the moved implementations.

Capabilities

CmsModule

application-cms — Layer 3 module for CMS surfaces.

Item
pub struct CmsModule
CmsModule :: fn new() -> Self
CmsModule :: fn name(& self) -> & 'static str
CmsModule :: fn version(& self) -> & 'static str
CmsModule :: fn migrations(& self) -> Vec <MigrationSet>
CmsModule :: async fn migrate_pending(& self, _pool : & PgPool) -> Result <u32, MigrationError>
CmsModule :: fn admin_router(& self) -> axum::Router <S>
CmsModule :: fn public_router(& self) -> axum::Router <S>

api (other)

Generic-over-S Axum routers for the CMS surfaces — Sprint 65.

Item
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>, CmsAttachmentState : FromRef <S>, application_core::SiteConfig : FromRef <S>,
fn public_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,

api::attachments_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,

AttachInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct AttachInput

GrantRequest

Sprint 65: extracted from rust-cms-engine.

Item
pub struct GrantRequest

ListQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct ListQuery

ReorderInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct ReorderInput

UpdateSortOrderInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct UpdateSortOrderInput

api::attachments_customer (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,

CustomerAttachInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct CustomerAttachInput

CustomerGrantRequest

Sprint 65: extracted from rust-cms-engine.

Item
pub struct CustomerGrantRequest

MeQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct MeQuery

TargetQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct TargetQuery

ViewQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct ViewQuery

api::audiences_admin (other)

Admin API for per-asset scoped-audience grants (Sprint 0.77).

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::blocks_admin (other)

Sprint 0.76 T4 — read-only endpoint exposing the embedded block

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

api::categories_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::content_serve (other)

Stateless content origin (Sprint 0.62, T-0.62.3).

Item
fn content_router(keyset : Keyset, media_root : impl Into <PathBuf>) -> Router

api::docs_admin (other)

Docs viewer admin REST router — Sprint 27 (Track 4).

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, application_core::SiteConfig : FromRef <S>,

api::downloads_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::downloads_public (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::logs (other)

/admin/logs — read-only observability views over the audit spine + jobs

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::media (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,

AltTextSuggestionIn

Sprint 65: extracted from rust-cms-engine.

Item
pub struct AltTextSuggestionIn

Asset

Sprint 65: extracted from rust-cms-engine.

Item
pub struct Asset

AssetPatch

Sprint 65: extracted from rust-cms-engine.

Item
pub struct AssetPatch

AssetSummary

Sprint 65: extracted from rust-cms-engine.

Item
pub struct AssetSummary

AssetTextDto

Sprint 65: extracted from rust-cms-engine.

Item
AssetTextDto :: fn from(t : content_assets::AssetText) -> Self

DescribeIn

Sprint 65: extracted from rust-cms-engine.

Item
pub struct DescribeIn

ListQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct ListQuery

ListResponse

Sprint 65: extracted from rust-cms-engine.

Item
pub struct ListResponse

PageInfo

Sprint 65: extracted from rust-cms-engine.

Item
pub struct PageInfo

UploadResponse

Sprint 65: extracted from rust-cms-engine.

Item
pub struct UploadResponse
UploadResponse :: fn from(r : UploadResult) -> Self

VariantOut

Sprint 65: extracted from rust-cms-engine.

Item
pub struct VariantOut

api::media_serve (other)

Gated media mint endpoint (Sprint 0.62 — was the 0.60/0.61 streaming handler).

Item
fn public_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,

api::pages_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

AccessSettingsInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct AccessSettingsInput

GenerateTranslationInput

Sprint 65: extracted from rust-cms-engine.

Item
pub struct GenerateTranslationInput

api::posts_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::posts_public (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

FeedQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct FeedQuery

IndexQuery

Sprint 65: extracted from rust-cms-engine.

Item
pub struct IndexQuery

api::redirects_admin (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::seo (other)

Axum handlers for /sitemap.xml + /robots.txt.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, application_core::SiteConfig : FromRef <S>,
fn health_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

api::settings (other)

Generic per-module settings admin API (Sprint 0.49 US-0.49.1/2).

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::sprint4 (other)

Sprint 65: extracted from rust-cms-engine.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

CmsAttachmentState

Per-module Axum state bits for the CMS routers — Sprint 65 (Gate

Item
pub struct CmsAttachmentState
CmsAttachmentState :: fn new(pool : PgPool) -> Self
CmsAttachmentState :: fn attachment_service(& self, pool : PgPool) -> AttachmentService

CmsMediaState

Per-module Axum state bits for the CMS routers — Sprint 65 (Gate

Item
pub struct CmsMediaState
CmsMediaState :: fn new(media_root : impl Into <PathBuf>) -> Self
CmsMediaState :: fn with_signing(mut self, signing : crate::media_serve_token::MediaSigning) -> Self

UploadLimits

Per-module Axum state bits for the CMS routers — Sprint 65 (Gate

Item
pub struct UploadLimits
UploadLimits :: fn default() -> Self

api::templates_admin (other)

Sprint 46 / Sprint 0.75: read-only endpoint exposing the embedded

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

api::widgets_admin (other)

Sprint 0.76 T7 — read-only endpoint exposing the embedded widget

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

BlockDefinition

Sprint 0.76 block definitions — a parallel registry to

Item
pub struct BlockDefinition
fn blocks() -> & 'static BlockDefinition
fn block(key : & str) -> Option <& 'static BlockDefinition>

SlotDefinition

Sprint 0.76 block definitions — a parallel registry to

Item
pub struct SlotDefinition

SlotType

Sprint 0.76 block definitions — a parallel registry to

Item
pub enum SlotType
SlotType :: fn is_list(self) -> bool
SlotType :: fn allowed_widget_keys(self) -> & 'static & 'static str

BlockInstance

Typed read access over a composed page's blocks array (Sprint 0.76).

Item
pub struct BlockInstance<'a>

BlockInstance<'a>

Typed read access over a composed page's blocks array (Sprint 0.76).

Item
BlockInstance<'a> :: fn raw(& self) -> & 'a Value
BlockInstance<'a> :: fn block_key(& self) -> & 'a str
BlockInstance<'a> :: fn id(& self) -> & 'a str
BlockInstance<'a> :: fn def(& self) -> Option <& 'static BlockDefinition>
BlockInstance<'a> :: fn str(& self, field : & str) -> & 'a str
BlockInstance<'a> :: fn get(& self, field : & str) -> Option <& 'a str>
BlockInstance<'a> :: fn markdown(& self, field : & str) -> String
BlockInstance<'a> :: fn url(& self, field : & str) -> & 'a str
BlockInstance<'a> :: fn image(& self, field : & str) -> ResolvedImage
BlockInstance<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>
BlockInstance<'a> :: fn slot(& self, slot_name : & str) -> Vec <WidgetInstance <'a>>

ComposedView

Typed read access over a composed page's blocks array (Sprint 0.76).

Item
pub struct ComposedView<'a>

ComposedView<'a>

Typed read access over a composed page's blocks array (Sprint 0.76).

Item
ComposedView<'a> :: fn new(metadata : & 'a Value) -> ComposedView <'a>
ComposedView<'a> :: fn blocks(& self) -> Vec <BlockInstance <'a>>

cms::block_wireframes (other)

Sprint 0.76 block wireframes — at-a-glance ASCII sketches of each block's

Item
fn block_wireframe(block_key : & str) -> Option <& 'static str>

cms::page_view (other)

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
fn sanitize_href(url : & str) -> & str

ContactMethod

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct ContactMethod

Faq

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct Faq

PageView

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct PageView<'a>

PageView<'a>:contact

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn contact_methods(& self) -> Vec <ContactMethod>

PageView<'a>:faqs

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn faqs(& self) -> Vec <Faq>

PageView<'a>:fields

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn fields(& self) -> & FieldDefinition

PageView<'a>:get

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn get(& self, field : & str) -> Option <& 'a str>

PageView<'a>:image

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn image(& self, field : & str) -> ResolvedImage

PageView<'a>:markdown

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn markdown(& self, field : & str) -> String

PageView<'a>:new

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn new(template_key : & str, metadata : & 'a Value) -> Option <PageView <'a>>

PageView<'a>:projects

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn projects(& self) -> Vec <Project>

PageView<'a>:repeater

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>

PageView<'a>:sectors

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn sectors(& self) -> Vec <Sector>

PageView<'a>:services

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn services(& self) -> Vec <ServiceCard>

PageView<'a>:str

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn str(& self, field : & str) -> & 'a str

PageView<'a>:team

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn team(& self) -> Vec <TeamMember>

PageView<'a>:template

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn template_key(& self) -> & str

PageView<'a>:url

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
PageView<'a> :: fn url(& self, field : & str) -> & 'a str

Project

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct Project

RowView

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct RowView<'a>

RowView<'a>

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
RowView<'a> :: fn from_value(row : & 'a Value) -> RowView <'a>
RowView<'a> :: fn str(& self, field : & str) -> & 'a str
RowView<'a> :: fn get(& self, field : & str) -> Option <& 'a str>
RowView<'a> :: fn value(& self) -> & 'a str
RowView<'a> :: fn markdown(& self, field : & str) -> String
RowView<'a> :: fn url(& self, field : & str) -> & 'a str
RowView<'a> :: fn image(& self, field : & str) -> ResolvedImage

Sector

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct Sector

ServiceCard

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct ServiceCard

TeamMember

Canonical public-render contract (Sprint 0.72 P1, ADR 0012).

Item
pub struct TeamMember
TeamMember :: fn initial(& self) -> String

FieldDefinition

Sprint 46 template definitions — driven by the embedded JSON

Item
pub struct FieldDefinition

FieldKind

Sprint 46 template definitions — driven by the embedded JSON

Item
pub enum FieldKind

TemplateDefinition

Sprint 46 template definitions — driven by the embedded JSON

Item
pub struct TemplateDefinition
fn templates() -> & 'static TemplateDefinition

WidgetDefinition

Sprint 0.76 T7 widget definitions — a parallel registry to

Item
pub struct WidgetDefinition
WidgetDefinition :: fn partial(& self) -> String
fn widgets() -> & 'static WidgetDefinition
fn widget(key : & str) -> Option <& 'static WidgetDefinition>

WidgetInstance

Sprint 0.76 T7 — typed read access over a block instance's slot widgets.

Item
pub struct WidgetInstance<'a>
fn slot_widgets <'a>(block_row : & 'a Value, slot_name : & str) -> Vec <WidgetInstance <'a>>

WidgetInstance<'a>

Sprint 0.76 T7 — typed read access over a block instance's slot widgets.

Item
WidgetInstance<'a> :: fn from_value(row : & 'a Value) -> WidgetInstance <'a>
WidgetInstance<'a> :: fn widget_key(& self) -> & 'a str
WidgetInstance<'a> :: fn id(& self) -> & 'a str
WidgetInstance<'a> :: fn image(& self, field : & str) -> ResolvedImage
WidgetInstance<'a> :: fn def(& self) -> Option <& 'static WidgetDefinition>
WidgetInstance<'a> :: fn str(& self, field : & str) -> & 'a str
WidgetInstance<'a> :: fn get(& self, field : & str) -> Option <& 'a str>
WidgetInstance<'a> :: fn markdown(& self, field : & str) -> String
WidgetInstance<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>

cms::widget_wireframes (other)

Sprint 0.76 T7 widget wireframes — at-a-glance ASCII sketches of each widget's

Item
fn widget_wireframe(widget_key : & str) -> Option <& 'static str>

cms::wireframes (other)

Sprint 0.75 template wireframes — at-a-glance ASCII sketches of each

Item
fn wireframe(template_key : & str) -> Option <& 'static str>

CmsError

Forge-cms error type.

Item
pub enum CmsError

CmsResult

Forge-cms error type.

Item
pub type CmsResult<T>: std::result::Result <T, CmsError>

EngineResult

Forge-cms error type.

Item
pub type EngineResult<T>: CmsResult <T>

verb:accessibility

AI image text — generates four complementary fields (alt text, caption,

Item
fn accessibility_system_prompt_for_locale(locale : & str) -> String
fn accessibility_system_prompt() -> String

verb:constants

AI image text — generates four complementary fields (alt text, caption,

Item
pub const PROMPT_VERSION: & str
pub const ALT_MAX_CHARS: usize
pub const MAX_OUTPUT_TOKENS: u32
pub const DESCRIBE_TENANT: Uuid
pub const ALL_FIELDS: & & str

verb:daily

AI image text — generates four complementary fields (alt text, caption,

Item
async fn daily_remaining(pool : & PgPool) -> Result <i64, MediaError>

verb:describe

AI image text — generates four complementary fields (alt text, caption,

Item
async fn describe_with_provider(pool : & PgPool, provider : & Arc <dyn AiProvider>, storage_root : & Path, asset_id : Uuid,) -> Result <(), MediaError>

verb:drain

AI image text — generates four complementary fields (alt text, caption,

Item
async fn drain_via_provider(pool : & PgPool, provider : & Arc <dyn AiProvider>, storage_root : & Path,) -> Result <u32, MediaError>

verb:mark

AI image text — generates four complementary fields (alt text, caption,

Item
async fn mark_pending(pool : & PgPool, asset_id : Uuid, fields : & & str,) -> Result <(), MediaError>
async fn mark_failed(pool : & PgPool, asset_id : Uuid, err : & str) -> Result <(), MediaError>

verb:media

AI image text — generates four complementary fields (alt text, caption,

Item
fn media_type_for_format(format : & str) -> String

verb:pick

AI image text — generates four complementary fields (alt text, caption,

Item
fn pick_vision_variant(variants : & (String, String, String)) -> Option <(String, String)>

verb:quota

AI image text — generates four complementary fields (alt text, caption,

Item
fn quota_reached(used_today : i64, limit : u32) -> bool

verb:record

AI image text — generates four complementary fields (alt text, caption,

Item
async fn record_text_revision(pool : & PgPool, asset_id : Uuid, alt_text : & str, accessibility_description : & str, caption : & str, description : & str, source : & str, changed_by : Option <Uuid>,) -> Result <(), MediaError>

verb:revert

AI image text — generates four complementary fields (alt text, caption,

Item
async fn revert_to_revision(pool : & PgPool, asset_id : Uuid, revision_id : Uuid, changed_by : Option <Uuid>,) -> Result <(), MediaError>

AssetTextRevision

AI image text — generates four complementary fields (alt text, caption,

Item
pub struct AssetTextRevision
async fn list_text_revisions(pool : & PgPool, asset_id : Uuid, limit : i64,) -> Result <Vec <AssetTextRevision>, MediaError>

PendingAltText

AI image text — generates four complementary fields (alt text, caption,

Item
pub struct PendingAltText
async fn list_pending(pool : & PgPool, storage_root : & Path, limit : i64,) -> Result <Vec <PendingAltText>, MediaError>

VisionAltText

AI image text — generates four complementary fields (alt text, caption,

Item
pub struct VisionAltText
fn build_ai_metadata(provider : & str, model : & str, result : & VisionAltText, source_sha256 : & str, generated_at_rfc3339 : & str,) -> serde_json::Value
fn parse_vision_response(raw : & str) -> Result <VisionAltText, MediaError>
fn ai_generate_event(asset_id : Uuid, provider : & str, model : & str, result : & VisionAltText,) -> application_audit_log::AuditLog
async fn record_suggestion(pool : & PgPool, asset_id : Uuid, result : & VisionAltText, provider : & str, model : & str,) -> Result <(), MediaError>
async fn record_localized_suggestion(pool : & PgPool, asset_id : Uuid, locale : & str, result : & VisionAltText, model : & str,) -> Result <(), MediaError>

jobs::describe_image::status (other)

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

Item
pub const NONE: & str
pub const PENDING: & str
pub const PROCESSING: & str
pub const COMPLETED: & str
pub const FAILED: & str

jobs::translate_asset_text (other)

translate_asset_text — async job that translates a CONFIRMED asset-text row

Item
pub const JOB_TYPE: & str
pub const TRANSLATE_TENANT: Uuid
async fn run(pool : & PgPool, translator : & dyn Translator, payload : & TranslateAssetTextPayload,) -> Result <Option <TranslationOutcome>, TranslateAssetTextError>

TranslateAssetTextError

translate_asset_text — async job that translates a CONFIRMED asset-text row

Item
pub enum TranslateAssetTextError

TranslateAssetTextPayload

translate_asset_text — async job that translates a CONFIRMED asset-text row

Item
pub struct TranslateAssetTextPayload

jobs::translate_page (other)

translate_page — async job that translates a CMS page into a target locale

Item
pub const JOB_TYPE: & str
pub const TRANSLATE_TENANT: Uuid
async fn run(pool : & PgPool, translator : & dyn Translator, payload : & TranslatePagePayload,) -> Result <bool, TranslateJobError>

TranslateJobError

translate_page — async job that translates a CMS page into a target locale

Item
pub enum TranslateJobError

TranslatePagePayload

translate_page — async job that translates a CMS page into a target locale

Item
pub struct TranslatePagePayload

jobs::variants (other)

generate_variants background job — completes the deferred image variants

Item
pub const JOB_TYPE: & str
pub const MEDIA_TENANT: Uuid
async fn run(pool : & PgPool, storage : & Arc <LocalStorage>, media_root : & Path, asset_id : Uuid,) -> Result <(), MediaError>

GenerateVariantsPayload

generate_variants background job — completes the deferred image variants

Item
pub struct GenerateVariantsPayload

media_serve_token (other)

Pure mint-side serving logic (Sprint 0.62, T-0.62.1 cont.).

Item
fn mime_for(format : & str) -> & 'static str
fn serve_type_and_disposition(content_type : & str) ->(String, Disposition)
fn sanitize_filename(name : & str) -> String
fn content_disposition(disp : Disposition, filename : & str) -> String
fn build_claims(input : & ClaimsInput, cfg : & MintConfig, now : i64) -> Claims
fn mint_redirect(input : & ClaimsInput, cfg : & MintConfig, now : i64,) -> Result <String, TokenError>
fn content_version(sha256 : Option <& str>, variant_id : Uuid) -> String

ClaimsInput

Pure mint-side serving logic (Sprint 0.62, T-0.62.1 cont.).

Item
pub struct ClaimsInput

Keyset

Pure mint-side serving logic (Sprint 0.62, T-0.62.1 cont.).

Item
pub struct Keyset
Keyset :: fn new(entries : Vec <(String, Vec <u8>)>) -> Self
Keyset :: fn get(& self, kid : & str) -> Option <Vec <u8>>

MediaSigning

Pure mint-side serving logic (Sprint 0.62, T-0.62.1 cont.).

Item
pub struct MediaSigning
MediaSigning :: fn config(& self) -> MintConfig <'_>
MediaSigning :: fn keyset(& self) -> Keyset

MintConfig

Pure mint-side serving logic (Sprint 0.62, T-0.62.1 cont.).

Item
pub struct MintConfig<'a>

media_token (other)

Capability-token codec for media delivery (Sprint 0.62, T-0.62.1).

Item
pub const MIN_SIGNING_KEY_LEN: usize
fn mint(claims : & Claims, key : & u8) -> Result <String, TokenError>
fn verify(token : & str, keyset : impl Fn(& str) -> Option <Vec <u8>>, now : i64,) -> Result <Claims, TokenError>

Claims

Capability-token codec for media delivery (Sprint 0.62, T-0.62.1).

Item
pub struct Claims

Disposition

Capability-token codec for media delivery (Sprint 0.62, T-0.62.1).

Item
pub enum Disposition

TokenError

Capability-token codec for media delivery (Sprint 0.62, T-0.62.1).

Item
pub enum TokenError

media_urls (other)

Gated media URL builders (Sprint 0.61, T-0.61.1).

Item
pub const DEFAULT_FEATURED_KIND: & str
pub const UNRESOLVED_MEDIA_URL: & str
fn gated_attachment_url(attachment_id : Uuid, kind : & str) -> String
fn public_asset_url(asset_id : Uuid, kind : & str) -> String
fn public_asset_url_fmt(asset_id : Uuid, kind : & str, format : & str) -> String
fn gated_asset_url(asset_id : Uuid, kind : & str) -> String
pub const FEATURED_KIND_PREFERENCE: & & str
pub const THUMBNAIL_KIND_PREFERENCE: & & str
fn best_available_kind <'a>(available : & String, preference : & & 'a str) -> Option <& 'a str>

middleware::referrer_log (other)

Public-page referrer logger — Sprint 5 T65.

Item
async fn referrer_log_layer(State(pool) : State <PgPool>, req : Request <Body>, next : Next,) -> Response

services::access_level (other)

AccessLevel enforcement + EntitlementResolver hook.

Item
async fn load_customer_roles(pool : & PgPool, party_id : Uuid,) -> Result <Vec <String>, sqlx::Error>
async fn check_page_access(page : & ContentPage, viewer : & Viewer, entitlement_resolver : & dyn EntitlementResolver,) -> Result <AccessDecision, sqlx::Error>
async fn update_page_access(pool : & PgPool, page_id : Uuid, access_level : AccessLevel, required_roles : Vec <String>, required_entitlements : Vec <String>,) -> Result <(), sqlx::Error>

AccessDecision

AccessLevel enforcement + EntitlementResolver hook.

Item
pub enum AccessDecision

EntitlementResolver

AccessLevel enforcement + EntitlementResolver hook.

Item
pub trait EntitlementResolver

NoopEntitlementResolver

AccessLevel enforcement + EntitlementResolver hook.

Item
pub struct NoopEntitlementResolver
NoopEntitlementResolver :: async fn has_entitlements(& self, _party_id : Uuid, _required_entitlements : & String,) -> Result <bool, sqlx::Error>

Viewer

AccessLevel enforcement + EntitlementResolver hook.

Item
pub struct Viewer
Viewer :: fn anonymous() -> Self
Viewer :: fn customer(party_id : Uuid, customer_roles : Vec <String>) -> Self
Viewer :: fn staff(party_id : Uuid) -> Self

PostgresAuditSink

Engine-side persistent AuditSink for attachment events.

Item
pub struct PostgresAuditSink
PostgresAuditSink :: fn new(pool : PgPool) -> Self
PostgresAuditSink :: async fn emit(& self, event : AuditEvent) -> Result <(), AssetError>
PostgresAuditSink :: fn is_persistent(& self) -> bool

FallbackDenyPolicy

Engine PolicyRegistry for attachments + default per-entity-

Item
pub struct FallbackDenyPolicy
FallbackDenyPolicy :: async fn can_attach(& self, _ctx : & PolicyContext, target_type : & str, _target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
FallbackDenyPolicy :: async fn can_view(& self, _ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
FallbackDenyPolicy :: async fn can_manage(& self, _ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>

OperatorOnlyPolicy

Engine PolicyRegistry for attachments + default per-entity-

Item
pub struct OperatorOnlyPolicy
OperatorOnlyPolicy :: fn cms_default() -> Self
OperatorOnlyPolicy :: async fn can_attach(& self, ctx : & PolicyContext, _target_type : & str, _target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
OperatorOnlyPolicy :: async fn can_view(& self, ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
OperatorOnlyPolicy :: async fn can_manage(& self, ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>

OwnerSelfPolicy

Engine PolicyRegistry for attachments + default per-entity-

Item
pub struct OwnerSelfPolicy
OwnerSelfPolicy :: fn default_for_person() -> Self
OwnerSelfPolicy :: async fn can_attach(& self, ctx : & PolicyContext, _target_type : & str, target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
OwnerSelfPolicy :: async fn can_view(& self, ctx : & PolicyContext, attachment : & AttachmentRow,) -> Result <bool, AssetError>
OwnerSelfPolicy :: async fn can_manage(& self, ctx : & PolicyContext, attachment : & AttachmentRow,) -> Result <bool, AssetError>

PolicyRegistry

Engine PolicyRegistry for attachments + default per-entity-

Item
pub struct PolicyRegistry
PolicyRegistry :: fn with_defaults() -> Self
PolicyRegistry :: fn empty() -> Self
PolicyRegistry :: fn for_target_type(& self, target_type : & str) -> Arc <dyn AttachmentPolicy>
PolicyRegistry :: fn default() -> Self

services::attachments (other)

Attachments service — thin wrapper around

Item
async fn attach(pool : & PgPool, input : AttachInput) -> Result <AttachmentRow, AssetError>
async fn list_for_entity(pool : & PgPool, entity_ref : & EntityRef,) -> Result <Vec <AttachmentWithAsset>, AssetError>
async fn get(pool : & PgPool, id : Uuid) -> Result <AttachmentRow, AssetError>
async fn set_primary(pool : & PgPool, id : Uuid) -> Result <AttachmentRow, AssetError>
async fn update_sort_order(pool : & PgPool, id : Uuid, new_sort_order : i32,) -> Result <AttachmentRow, AssetError>
async fn reorder(pool : & PgPool, entity_ref : & EntityRef, field_name : & str, ordered_ids : & Uuid,) -> Result <(), AssetError>
async fn detach(pool : & PgPool, id : Uuid) -> Result <(), AssetError>

services::backdrop_pool (other)

Backdrop pool cache.

Item
pub const BACKDROP_TAG: & str
async fn pick_random(pool : & PgPool) -> Option <Uuid>
async fn current_pool(pool : & PgPool) -> Vec <Uuid>
fn invalidate_cache()

services::backdrops (other)

Backdrop slot resolver.

Item
async fn is_dynamic_for_slug(pool : & PgPool, settings : & SiteSettingsView, slug : & str) -> bool
async fn public_image_url(pool : & PgPool, asset_id : Uuid) -> Option <String>

ResolvedBackdrop

Backdrop slot resolver.

Item
pub struct ResolvedBackdrop
async fn resolve(pool : & PgPool, settings : & SiteSettingsView, slug : & str, legacy_fallback : & str,) -> ResolvedBackdrop

Assignment

Backdrop assignments admin service.

Item
pub enum Assignment
async fn list_assignments(pool : & PgPool) -> Result <Vec <SlotEntry>, BackdropAdminError>
async fn get_assignment(pool : & PgPool, slug : & str) -> Result <Assignment, BackdropAdminError>
async fn set_assignment(pool : & PgPool, slug : & str, assignment : Assignment,) -> Result <(), BackdropAdminError>
async fn clear_assignment(pool : & PgPool, slug : & str) -> Result <(), BackdropAdminError>

BackdropAdminError

Backdrop assignments admin service.

Item
pub enum BackdropAdminError

SlotEntry

Backdrop assignments admin service.

Item
pub struct SlotEntry

BlogQuery

Blog services + pagination library crates.

Item
pub struct BlogQuery

Page

Blog services + pagination library crates.

Item
pub struct Page<T>

PageCursor

Blog services + pagination library crates.

Item
pub struct PageCursor
PageCursor :: fn new(value : impl Into <String>) -> Self
PageCursor :: fn as_str(& self) -> & str

PageInfo

Sprint 65: extracted from rust-cms-engine.

Item
pub struct PageInfo

services::categories (other)

Categories service — wraps the cms_categories table from

Item
async fn list(pool : & PgPool) -> Result <Vec <Category>, CategoryError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Category>, CategoryError>
async fn create(pool : & PgPool, input : UpsertCategoryInput) -> Result <Category, CategoryError>
async fn update(pool : & PgPool, id : Uuid, input : UpsertCategoryInput,) -> Result <Category, CategoryError>

Category

Categories service — wraps the cms_categories table from

Item
pub struct Category

CategoryError

Categories service — wraps the cms_categories table from

Item
pub enum CategoryError
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), CategoryError>

UpsertCategoryInput

Categories service — wraps the cms_categories table from

Item
pub struct UpsertCategoryInput

ClaudeCliProvider

claude CLI vision provider (Sprint 0.53 US-0.53.8).

Item
pub struct ClaudeCliProvider
ClaudeCliProvider :: fn from_env() -> Self
ClaudeCliProvider :: async fn complete(& self, request : CompletionRequest) -> Result <CompletionResponse>
ClaudeCliProvider :: fn is_available(& self) -> bool
ClaudeCliProvider :: fn name(& self) -> & 'static str
ClaudeCliProvider :: fn default_model(& self) -> & str

BlogCategoryRow

Postgres adapter for content-cms ContentPage rows.

Item
pub struct BlogCategoryRow

PostgresCmsBackend:PostgresCmsBackend

Postgres adapter for content-cms ContentPage rows.

Item
pub struct PostgresCmsBackend

PostgresCmsBackend:count

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn count_published_posts(& self) -> Result <i64, sqlx::Error>
PostgresCmsBackend :: async fn count_posts_by_category(& self, category_id : Uuid) -> Result <i64, sqlx::Error>
PostgresCmsBackend :: async fn count_posts_by_tag(& self, tag : & str) -> Result <i64, sqlx::Error>

PostgresCmsBackend:discard

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn discard_draft(& self, page_id : Uuid) -> Result <bool, sqlx::Error>

PostgresCmsBackend:find

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn find_published_by_slug(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn find_by_slug_any_status(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn find_published_post_by_slug(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn find_category_by_slug(& self, slug : & str,) -> Result <Option <BlogCategoryRow>, sqlx::Error>
PostgresCmsBackend :: async fn find_category_by_id(& self, id : Uuid,) -> Result <Option <BlogCategoryRow>, sqlx::Error>
async fn find_published_by_slug_localized(backend : & PostgresCmsBackend, slug : & str, lang : & str,) -> Result <Option <ContentPage>, sqlx::Error>

PostgresCmsBackend:list

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn list_published_posts(& self, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn list_posts_by_category(& self, category_id : Uuid, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn list_posts_by_tag(& self, tag : & str, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn list_related_posts(& self, category_id : Option <Uuid>, exclude : Uuid, limit : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn list_categories(& self) -> Result <Vec <BlogCategoryRow>, sqlx::Error>
PostgresCmsBackend :: async fn list_tags(& self) -> Result <Vec <String>, sqlx::Error>
PostgresCmsBackend :: async fn list_indexable(& self) -> Result <Vec <ContentPage>, sqlx::Error>

PostgresCmsBackend:new

Postgres adapter for content-cms ContentPage rows.

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

PostgresCmsBackend:pool

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: fn pool(& self) -> & PgPool

PostgresCmsBackend:publish

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn publish_page(& self, page_id : Uuid, user_id : Uuid) -> Result <bool, sqlx::Error>

PostgresCmsBackend:record

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn record_draft_save(& self, page_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>

PostgresCmsBackend:rollback

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn rollback_published(& self, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>

PostgresCmsBackend:unpublish

Postgres adapter for content-cms ContentPage rows.

Item
PostgresCmsBackend :: async fn unpublish_page(& self, page_id : Uuid, user_id : Uuid) -> Result <bool, sqlx::Error>

services::cms_admin (other)

CMS Pages admin service — list / create / update / publish /

Item
pub const DEFAULT_TREE_CAP: i64
fn slugify(title : & str) -> String
fn html_to_markdown(html : & str) -> String
fn markdown_to_html(src : & str) -> String
async fn build_preview_data(pool : & PgPool, page : & Page, locale : Option <& str>,) -> Result <crate::views::preview::PreviewData, CmsAdminError>
async fn purge_trashed(pool : & PgPool, dry_run : bool, actor_id : Option <Uuid>,) -> Result <TrashOutcome, CmsAdminError>

CmsAdminError

CMS Pages admin service — list / create / update / publish /

Item
pub enum CmsAdminError

CreatePageInput

CMS Pages admin service — list / create / update / publish /

Item
pub struct CreatePageInput

ListFilter

CMS Pages admin service — list / create / update / publish /

Item
pub struct ListFilter

ListMode

CMS Pages admin service — list / create / update / publish /

Item
pub enum ListMode

Page

Blog services + pagination library crates.

Item
pub struct Page
async fn list_pages(pool : & PgPool, filter : ListFilter, cursor : Option <& str>, limit : i64, tree_cap : i64,) -> Result <PageList, CmsAdminError>
async fn get_page(pool : & PgPool, id : Uuid) -> Result <Option <Page>, CmsAdminError>
async fn create_page(pool : & PgPool, input : CreatePageInput, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn update_page(pool : & PgPool, id : Uuid, patch : UpdatePageInput, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn publish_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn unpublish_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn soft_delete_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <(), CmsAdminError>
async fn restore_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn plan_page_purge(pool : & PgPool, id : Uuid, strategy : Option <PurgeStrategy>, include_live_target : bool, include_live_subtree : bool,) -> Result <PagePurgePlan, CmsAdminError>
async fn execute_page_purge(pool : & PgPool, plan : & PagePurgePlan, actor_id : Option <Uuid>,) -> Result <(), CmsAdminError>

PageList

CMS Pages admin service — list / create / update / publish /

Item
pub struct PageList

PagePurgePlan

CMS Pages admin service — list / create / update / publish /

Item
pub struct PagePurgePlan

PageSummary

CMS Pages admin service — list / create / update / publish /

Item
pub struct PageSummary

ParentFilter

CMS Pages admin service — list / create / update / publish /

Item
pub enum ParentFilter

PatchTranslationInput

CMS Pages admin service — list / create / update / publish /

Item
pub struct PatchTranslationInput

PurgeStrategy

CMS Pages admin service — list / create / update / publish /

Item
pub enum PurgeStrategy

TemplateKey

CMS Pages admin service — list / create / update / publish /

Item
pub enum TemplateKey
TemplateKey :: fn json_key(& self) -> & 'static str

Translation

CMS Pages admin service — list / create / update / publish /

Item
pub struct Translation
async fn patch_translation(pool : & PgPool, page_id : Uuid, locale : & str, patch : PatchTranslationInput, actor_id : Option <Uuid>,) -> Result <Translation, CmsAdminError>

TranslationInput

CMS Pages admin service — list / create / update / publish /

Item
pub struct TranslationInput

TranslationSummary

CMS Pages admin service — list / create / update / publish /

Item
pub struct TranslationSummary

TrashOutcome

CMS Pages admin service — list / create / update / publish /

Item
pub struct TrashOutcome

TrashPlan

CMS Pages admin service — list / create / update / publish /

Item
pub struct TrashPlan

TreeMeta

CMS Pages admin service — list / create / update / publish /

Item
pub struct TreeMeta

UpdatePageInput

CMS Pages admin service — list / create / update / publish /

Item
pub struct UpdatePageInput

services::cms_versions (other)

cms_page_versions persistence helpers — write + fetch.

Item
async fn write_version <'e, E>(executor : E, version_id : Uuid, page_id : Uuid, snapshot : & JsonValue, reason : VersionReason, saved_by : Option <Uuid>, summary : & str,) -> Result <Uuid, sqlx::Error> where E : sqlx::PgExecutor <'e>,
async fn fetch_versions(pool : & PgPool, page_id : Uuid) -> Vec <PageVersion>
async fn fetch_version(pool : & PgPool, page_id : Uuid, version_id : Uuid) -> Option <PageVersion>
fn canonicalize_json(value : & JsonValue) -> String
fn snapshot_to_diff_text(snapshot : & PublishSnapshot) -> String
async fn set_published_version(pool : & PgPool, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>

DiffRow

cms_page_versions persistence helpers — write + fetch.

Item
pub struct DiffRow
fn build_side_by_side_diff(left : & str, right : & str) -> Vec <DiffRow>

RestoreDraftCols

cms_page_versions persistence helpers — write + fetch.

Item
pub struct RestoreDraftCols
fn restore_draft_columns(snapshot : & PublishSnapshot) -> RestoreDraftCols

RestoreOutcome

cms_page_versions persistence helpers — write + fetch.

Item
pub enum RestoreOutcome
async fn restore_draft_from_version(pool : & PgPool, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <RestoreOutcome, sqlx::Error>

VersionDiff

cms_page_versions persistence helpers — write + fetch.

Item
pub struct VersionDiff
async fn diff_versions(pool : & PgPool, page_id : Uuid, version_id : Uuid, against : & str,) -> Result <Option <VersionDiff>, sqlx::Error>

services::docs (other)

Docs viewer service — read-only markdown + attachment tree.

Item
fn tree(cfg : & DocsConfig, can_see_operator_only : bool) -> Vec <TreeNode>
fn resolve(cfg : & DocsConfig, rel_path : & str, can_see_operator_only : bool,) -> Result <PathBuf, PathError>
fn breadcrumb(rel_path : & str) -> Vec <(String, String)>
fn mime_for(p : & Path) -> & 'static str

DocsConfig

Docs viewer service — read-only markdown + attachment tree.

Item
pub struct DocsConfig
fn is_accessible(cfg : & DocsConfig, rel_path : & str, abs : & Path, can_see_operator_only : bool,) -> bool

DocsError

Docs viewer service — read-only markdown + attachment tree.

Item
pub enum DocsError
fn render_markdown(abs : & Path, rel_path : & str) -> Result <(String, String), DocsError>

FileKind

Docs viewer service — read-only markdown + attachment tree.

Item
pub enum FileKind

PathError

Docs viewer service — read-only markdown + attachment tree.

Item
pub enum PathError

TreeNode

Docs viewer service — read-only markdown + attachment tree.

Item
pub enum TreeNode

services::downloads (other)

Downloads service — PDF library admin + public surfaces.

Item
async fn list_all(pool : & PgPool) -> Result <Vec <Download>, DownloadsError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Download, DownloadsError>
async fn create(pool : & PgPool, input : CreateDownloadInput) -> Result <Download, DownloadsError>
async fn update(pool : & PgPool, id : Uuid, input : UpdateDownloadInput,) -> Result <Download, DownloadsError>
async fn list_published(pool : & PgPool) -> Result <Vec <Download>, DownloadsError>
async fn get_by_slug(pool : & PgPool, slug : & str) -> Result <Download, DownloadsError>

CreateDownloadInput

Downloads service — PDF library admin + public surfaces.

Item
pub struct CreateDownloadInput

Download

Downloads service — PDF library admin + public surfaces.

Item
pub struct Download

DownloadsError

Downloads service — PDF library admin + public surfaces.

Item
pub enum DownloadsError
async fn soft_delete(pool : & PgPool, id : Uuid) -> Result <(), DownloadsError>

UpdateDownloadInput

Downloads service — PDF library admin + public surfaces.

Item
pub struct UpdateDownloadInput

services::featured_attachment (other)

Featured-image → attachment sync (Sprint 0.61, T-0.61.2).

Item
async fn sync_featured_attachment(conn : & mut PgConnection, page_id : Uuid, lang : & str, featured_image_id : Option <Uuid>,) -> Result <(), sqlx::Error>

services::markdown (other)

Markdown → sanitized HTML pipeline for CMS bodies.

Item
fn render(markdown : & str) -> String
fn render_unsanitized(markdown : & str) -> String
fn sanitize_html(input : & str) -> String

services::media (other)

Media ingest — a THIN WRAPPER over content-assets (Sprint 0.81).

Item
pub const MAX_DIMENSION: u32
pub const MAX_SIZE_BYTES: usize
pub const ALL_VARIANT_KINDS: & & str
fn sniff_image_format(bytes : & u8) -> Option <& 'static str>
async fn ingest(pool : & PgPool, storage : & Arc <LocalStorage>, _storage_root : & std::path::Path, bytes : Vec <u8>, declared_mime : & str, original_filename : & str, uploaded_by_id : Option <Uuid>, immediate_kinds : & & str,) -> Result <UploadResult, MediaError>
async fn ingest_blob(pool : & PgPool, storage : & Arc <LocalStorage>, bytes : Vec <u8>, declared_mime : & str, original_filename : & str, uploaded_by_id : Option <Uuid>,) -> Result <UploadResult, MediaError>

MediaError

Media ingest — a THIN WRAPPER over content-assets (Sprint 0.81).

Item
pub enum MediaError
MediaError :: fn from(e : sqlx::Error) -> Self
MediaError :: fn from(e : IngestError) -> Self
MediaError :: fn from(e : AssetError) -> Self
async fn regenerate_variants_for_asset(pool : & PgPool, storage : & Arc <LocalStorage>, _storage_root : & std::path::Path, asset_id : Uuid,) -> Result <usize, MediaError>
async fn recrop_variants_for_asset(pool : & PgPool, storage : & Arc <LocalStorage>, asset_id : Uuid,) -> Result <usize, MediaError>

MediaSettings

Media ingest — a THIN WRAPPER over content-assets (Sprint 0.81).

Item
pub struct MediaSettings
MediaSettings :: fn auto_fields(& self) -> Vec <& 'static str>
MediaSettings :: fn default() -> Self
MediaSettings :: fn is_async(& self) -> bool
MediaSettings :: fn immediate_kinds(& self) -> & 'static & 'static str

UploadResult

Media ingest — a THIN WRAPPER over content-assets (Sprint 0.81).

Item
pub struct UploadResult
UploadResult :: fn from(r : content_assets::ingest::UploadResult) -> Self

services::media_access (other)

Gated media serving — DB resolution (Sprint 0.60, T-0.60.3).

Item
async fn resolve_attachment_serving(pool : & PgPool, attachment_id : Uuid, kind : & str, viewer : & Viewer,) -> Result <ServeOutcome, MediaAccessError>

MediaAccessError

Gated media serving — DB resolution (Sprint 0.60, T-0.60.3).

Item
pub enum MediaAccessError
async fn build_request_viewer(pool : & PgPool, authenticated : bool, user_id : Option <Uuid>,) -> Result <Viewer, MediaAccessError>

ServeOutcome

Gated media serving — DB resolution (Sprint 0.60, T-0.60.3).

Item
pub enum ServeOutcome

ServeTarget

Gated media serving — DB resolution (Sprint 0.60, T-0.60.3).

Item
pub struct ServeTarget

services::media_audience (other)

The asset-level audience evaluator's SQL shell (Sprint 0.77).

Item
async fn resolve_public_attachment_serving(pool : & PgPool, attachment_id : Uuid, kind : & str,) -> Result <PublicServeOutcome, AudienceError>
async fn resolve_public_asset_serving(pool : & PgPool, asset_id : Uuid, kind : & str,) -> Result <PublicServeOutcome, AudienceError>
async fn audience_targets(pool : & PgPool, surface : Surface,) -> Result <Vec <AudienceTarget>, AudienceError>

AudienceError

The asset-level audience evaluator's SQL shell (Sprint 0.77).

Item
pub enum AudienceError
async fn build_actor_subjects(pool : & PgPool, surface : Surface, authenticated : bool, user_id : Option <Uuid>,) -> Result <ActorSubjects, AudienceError>
async fn load_asset_state(pool : & PgPool, asset_id : Uuid, kind : & str,) -> Result <AssetState, AudienceError>
async fn load_active_grants(pool : & PgPool, asset_id : Uuid, action : Action,) -> Result <Vec <ActiveGrant>, AudienceError>
async fn evaluate_asset_serving(pool : & PgPool, asset_id : Uuid, kind : & str, surface : Surface, action : Action, authenticated : bool, user_id : Option <Uuid>,) -> Result <Decision, AudienceError>
async fn list_grants(pool : & PgPool, asset_id : Uuid,) -> Result <Vec <AssetAudienceGrant>, AudienceError>
async fn create_grant(pool : & PgPool, mut input : GrantInput, granted_by : Option <Uuid>,) -> Result <AssetAudienceGrant, AudienceError>
async fn revoke_grant(pool : & PgPool, asset_id : Uuid, grant_id : Uuid, revoked_by : Option <Uuid>,) -> Result <bool, AudienceError>
async fn filter_public_render_map(pool : & PgPool, map : & mut std::collections::HashMap <Uuid, Uuid>, kind : & str,) -> Result <(), AudienceError>

AudienceTarget

The asset-level audience evaluator's SQL shell (Sprint 0.77).

Item
pub struct AudienceTarget

PublicServeOutcome

The asset-level audience evaluator's SQL shell (Sprint 0.77).

Item
pub enum PublicServeOutcome

PublicServeTarget

The asset-level audience evaluator's SQL shell (Sprint 0.77).

Item
pub struct PublicServeTarget

services::media_field_attachment (other)

Metadata image-field → attachment sync (Sprint 0.71 slice 2, ADR 0011).

Item
pub const MEDIA_FIELD_NAME: & str
async fn resync_page_media_attachments(conn : & mut PgConnection, page_id : Uuid,) -> Result <(), sqlx::Error>
async fn sync_media_field_attachments(conn : & mut PgConnection, page_id : Uuid, asset_ids : & Uuid,) -> Result <(), sqlx::Error>
async fn load_page_media_map(pool : & sqlx::PgPool, page_id : Uuid,) -> Result <crate::services::media_resolve::AttachmentMap, sqlx::Error>

services::media_resolve (other)

Asset-id ref resolver — pure decidable surface (Sprint 0.71 slice 2,

Item
pub const ASSET_REF_PREFIX: & str
fn ref_asset_id(value : & str) -> Option <Uuid>
fn resolve(value : & str, attachments : & AttachmentMap, kind : & str) -> ResolvedMedia
fn collect_field_asset_ids(def : & TemplateDefinition, metadata : & serde_json::Value,) -> Vec <Uuid>
fn rewrite_metadata_media(def : & TemplateDefinition, metadata : & mut serde_json::Value, attachments : & AttachmentMap, variants : & VariantMap, kind : & str,)
fn collect_block_asset_ids(metadata : & serde_json::Value) -> Vec <Uuid>
fn rewrite_blocks_media(metadata : & mut serde_json::Value, attachments : & AttachmentMap, variants : & VariantMap, kind : & str,)

AttachmentMap

Asset-id ref resolver — pure decidable surface (Sprint 0.71 slice 2,

Item
pub type AttachmentMap: HashMap <Uuid, Uuid>

MediaRef

Asset-id ref resolver — pure decidable surface (Sprint 0.71 slice 2,

Item
pub enum MediaRef
fn parse_ref(value : & str) -> MediaRef

ResolvedMedia

Asset-id ref resolver — pure decidable surface (Sprint 0.71 slice 2,

Item
pub enum ResolvedMedia

VariantMap

Asset-id ref resolver — pure decidable surface (Sprint 0.71 slice 2,

Item
pub type VariantMap: HashMap <Uuid, Vec <content_assets::variants_read::VariantInfo>>

MediaVariantSettings

Media variant-pipeline settings — backed by the DEDICATED single-row

Item
pub struct MediaVariantSettings
MediaVariantSettings :: fn default() -> Self
MediaVariantSettings :: fn is_async(& self) -> bool
MediaVariantSettings :: fn immediate_kinds(& self) -> & 'static & 'static str
async fn get(pool : & PgPool) -> Result <MediaVariantSettings, sqlx::Error>
async fn get_or_default(pool : & PgPool) -> MediaVariantSettings
async fn set(pool : & PgPool, s : & MediaVariantSettings) -> Result <(), sqlx::Error>

services::module_settings (other)

Generic per-module settings store — module_settings(module, key, value JSONB).

Item
async fn get_or <T : DeserializeOwned>(pool : & PgPool, module : & str, key : & str, default : T) -> T

ModuleSettingsError

Generic per-module settings store — module_settings(module, key, value JSONB).

Item
pub enum ModuleSettingsError
async fn get <T : DeserializeOwned>(pool : & PgPool, module : & str, key : & str,) -> Result <Option <T>, ModuleSettingsError>
async fn set <T : Serialize>(pool : & PgPool, module : & str, key : & str, value : & T,) -> Result <(), ModuleSettingsError>

services::pdf_sanitize (other)

PDF active-content stripping at ingest (Sprint 0.69).

Item
pub const SANITIZE_MAX_BYTES: usize

PdfSanitizer

PDF active-content stripping at ingest (Sprint 0.69).

Item
pub struct PdfSanitizer
PdfSanitizer :: fn default() -> Self
PdfSanitizer :: fn from_env() -> Self
PdfSanitizer :: fn binary(& self) -> & str
PdfSanitizer :: fn available(& self) -> bool
PdfSanitizer :: fn args(input : & str, output : & str) -> Vec <String>
PdfSanitizer :: async fn sanitize(& self, input : & u8) -> Result <Vec <u8>, SanitizeError>
PdfSanitizer :: fn handles(& self, content_type : & str) -> bool
PdfSanitizer :: async fn sanitize(& self, _content_type : & str, bytes : & u8,) -> Result <Vec <u8>, content_assets::error::AssetError>

SanitizeError

PDF active-content stripping at ingest (Sprint 0.69).

Item
pub enum SanitizeError

TempDir

PDF active-content stripping at ingest (Sprint 0.69).

Item
TempDir :: fn drop(& mut self)

services::posts (other)

Posts service — wraps cms_pages WHERE page_type='post'.

Item
async fn list(pool : & PgPool, filter : ListFilter) -> Result <Vec <Post>, PostError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Post>, PostError>
async fn get_by_slug(pool : & PgPool, slug : & str) -> Result <Option <Post>, PostError>
async fn create(pool : & PgPool, input : CreatePostInput, actor_id : Option <Uuid>,) -> Result <Post, PostError>
async fn update(pool : & PgPool, id : Uuid, patch : UpdatePostInput) -> Result <Post, PostError>

CreatePostInput

Posts service — wraps cms_pages WHERE page_type='post'.

Item
pub struct CreatePostInput

ListFilter

CMS Pages admin service — list / create / update / publish /

Item
pub struct ListFilter

Post

Posts service — wraps cms_pages WHERE page_type='post'.

Item
pub struct Post
Post :: fn metadata_as <T>(& self) -> Result <T, serde_json::Error> where T : serde::de::DeserializeOwned,

PostError

Posts service — wraps cms_pages WHERE page_type='post'.

Item
pub enum PostError
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), PostError>

UpdatePostInput

Posts service — wraps cms_pages WHERE page_type='post'.

Item
pub struct UpdatePostInput

PostgresPublicPageReader

Published-only public-read facade over the CMS (lift #3, Sprint 0.72/0.74).

Item
pub struct PostgresPublicPageReader
PostgresPublicPageReader :: fn new(pool : PgPool) -> Self
PostgresPublicPageReader :: async fn get_page_by_slug(& self, lang : & str, slug : & str) -> Option <PublicPageContent>

PublicPageContent

Published-only public-read facade over the CMS (lift #3, Sprint 0.72/0.74).

Item
pub struct PublicPageContent

PublicPageReader

Published-only public-read facade over the CMS (lift #3, Sprint 0.72/0.74).

Item
pub trait PublicPageReader

services::redirects (other)

Redirects service — wraps the cms_redirects table from

Item
async fn list(pool : & PgPool) -> Result <Vec <Redirect>, RedirectError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Redirect>, RedirectError>
async fn create(pool : & PgPool, input : UpsertRedirectInput) -> Result <Redirect, RedirectError>
async fn update(pool : & PgPool, id : Uuid, input : UpsertRedirectInput,) -> Result <Redirect, RedirectError>

Redirect

Redirects service — wraps the cms_redirects table from

Item
pub struct Redirect

RedirectError

Redirects service — wraps the cms_redirects table from

Item
pub enum RedirectError
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), RedirectError>
async fn resolve(pool : & PgPool, from : & str) -> Result <Option <(String, bool)>, RedirectError>

UpsertRedirectInput

Redirects service — wraps the cms_redirects table from

Item
pub struct UpsertRedirectInput

services::renditions (other)

Preview renditions (Sprint 0.70).

Item
pub const FLOOR_MAX_PX: u32
pub const FLOOR_BLUR_SIGMA: f32
fn blur_floor_jpeg(bytes : & u8, max_px : u32, sigma : f32) -> Result <Vec <u8>, MediaError>
async fn generate_blur_floor(pool : & PgPool, storage : & Arc <LocalStorage>, asset_id : Uuid,) -> Result <Uuid, MediaError>

services::responsive_images (other)

Responsive, context-aware <picture> render helper (Sprint 0.82-C).

Item
fn render_picture(asset_id : Uuid, profile : SlotProfile, available : & VariantInfo, alt : & str,) -> PictureMarkup
async fn variant_kind_exists(pool : & PgPool, asset_id : Uuid, kind : & str) -> bool
async fn resolve_picture(pool : & PgPool, asset_id : Uuid, profile : SlotProfile, alt : & str,) -> PictureMarkup
fn resolved_image(asset_id : Uuid, profile : SlotProfile, alt : & str, available : & VariantInfo, url : String,) -> ResolvedImage

PictureMarkup

Responsive, context-aware <picture> render helper (Sprint 0.82-C).

Item
pub struct PictureMarkup

ResolvedImage

Responsive, context-aware <picture> render helper (Sprint 0.82-C).

Item
pub struct ResolvedImage
ResolvedImage :: fn has_picture(& self) -> bool
ResolvedImage :: fn has_image(& self) -> bool

SlotProfile

Responsive, context-aware <picture> render helper (Sprint 0.82-C).

Item
pub enum SlotProfile
SlotProfile :: fn from_slot_name(name : Option <& str>) -> SlotProfile

services::scan (other)

AV scanning + quarantine (Sprint 0.68).

Item
fn status_after_scan(result : & Result <ScanVerdict, ScanError>) -> & 'static str
fn scan_allows_serve(scan_status : & str) -> bool
fn parse_clamd_response(resp : & str) -> Result <ScanVerdict, ScanError>

AvMode

AV scanning + quarantine (Sprint 0.68).

Item
pub enum AvMode
AvMode :: fn from_env() -> Self
AvMode :: fn ingest_status(self) -> & 'static str
AvMode :: fn ingest_engine(self) -> Option <& 'static str>

ClamdScanner

AV scanning + quarantine (Sprint 0.68).

Item
pub struct ClamdScanner
ClamdScanner :: fn new(addr : impl Into <String>) -> Self
ClamdScanner :: async fn scan(& self, bytes : & u8) -> Result <ScanVerdict, ScanError>

ScanError

AV scanning + quarantine (Sprint 0.68).

Item
pub enum ScanError

ScanVerdict

AV scanning + quarantine (Sprint 0.68).

Item
pub enum ScanVerdict

services::search (other)

Universal search service — FTS-backed multi-entity search.

Item
async fn search(pool : & PgPool, q : & str, types : Option <& String>, limit_per_type : i64,) -> Result <SearchResponse, SearchError>

FacetCount

Universal search service — FTS-backed multi-entity search.

Item
pub struct FacetCount

SearchError

Universal search service — FTS-backed multi-entity search.

Item
pub enum SearchError

SearchHit

Universal search service — FTS-backed multi-entity search.

Item
pub enum SearchHit

SearchResponse

Universal search service — FTS-backed multi-entity search.

Item
pub struct SearchResponse

NullSearchConsoleProvider

Search Console provider trait — engine consumption point for the

Item
pub struct NullSearchConsoleProvider
NullSearchConsoleProvider :: async fn fetch_facts(& self, _query : SearchConsoleQuery,) -> EngineResult <Vec <SearchConsoleFact>>

SearchConsoleFact

Search Console provider trait — engine consumption point for the

Item
pub struct SearchConsoleFact

SearchConsoleProvider

Search Console provider trait — engine consumption point for the

Item
pub trait SearchConsoleProvider

SearchConsoleQuery

Search Console provider trait — engine consumption point for the

Item
pub struct SearchConsoleQuery

services::seo (other)

Per-locale SEO — decidable logic for the Sprint 0.36 deprecate-then-drop

Item
fn resolve_seo_backfill(page_level : Option <& str>, locale_value : Option <& str>,) -> Option <String>
fn is_seo_backfill_conflict(page_level : Option <& str>, locale_value : Option <& str>) -> bool
fn snapshot_schema_version(snapshot : & Value) -> u32

DraftState

Per-locale SEO — decidable logic for the Sprint 0.36 deprecate-then-drop

Item
pub enum DraftState
fn compute_draft_state(published_at : Option <chrono::DateTime <chrono::Utc>>, published_snapshot_hash : Option <& str>, working_copy_hash : & str,) -> DraftState

services::site_settings (other)

Sitewide settings — the cached view of the site_settings

Item
fn invalidate_cache()

SiteSettingsView

Sitewide settings — the cached view of the site_settings

Item
pub struct SiteSettingsView
SiteSettingsView :: fn phone_display(& self) -> String
async fn site_settings(pool : & PgPool) -> SiteSettingsView

services::sitemap (other)

Sitemap XML emission.

Item
fn robots_txt_body(site_url : & str, is_staging : bool) -> String

ExtraRoute

Sitemap XML emission.

Item
pub struct ExtraRoute<'a>
async fn sitemap_xml_string(cms : & PostgresCmsBackend, site_url : & str, extra_routes : & ExtraRoute <'_>,) -> String

Tag

Tags service — the canonical write path (Gate 1.5 Gemini R1).

Item
pub struct Tag
async fn list_tags(pool : & PgPool, q : Option <& str>, limit : i64) -> Result <Vec <Tag>, TagError>
async fn upsert_tag(pool : & PgPool, slug : & str, label : & str) -> Result <Tag, TagError>
async fn set_asset_tags(pool : & PgPool, asset_id : Uuid, tag_slugs : & String,) -> Result <(), TagError>

TagError

Tags service — the canonical write path (Gate 1.5 Gemini R1).

Item
pub enum TagError

services::translations (other)

cms_page_translations service — CRUD + row-level fallback

Item
async fn upsert <'e, E>(executor : E, page_id : Uuid, lang : & str, metadata : & JsonValue, snapshot : & JsonValue, seo_title : & str, seo_description : & str, canonical_url : & str, og_image_url : & str, featured_image_id : Option <Uuid>,) -> Result <bool, sqlx::Error> where E : sqlx::PgExecutor <'e>,
async fn retain_langs <'e, E>(executor : E, page_id : Uuid, keep : & String,) -> Result <u64, sqlx::Error> where E : sqlx::PgExecutor <'e>,
async fn delete(pool : & PgPool, page_id : Uuid, lang : & str) -> Result <bool, sqlx::Error>
async fn exists_for_page(pool : & PgPool, page_id : Uuid, lang : & str,) -> Result <bool, sqlx::Error>

TranslationRow

cms_page_translations service — CRUD + row-level fallback

Item
pub struct TranslationRow
TranslationRow :: fn to_locale_snapshot(& self) -> content_cms::LocaleSnapshot
async fn find_for_page(pool : & PgPool, page_id : Uuid, lang : & str,) -> Result <Option <TranslationRow>, sqlx::Error>
async fn list_for_page(pool : & PgPool, page_id : Uuid,) -> Result <Vec <TranslationRow>, sqlx::Error>

views::jsonld (other)

schema.org JSON-LD types + builders for public-page emission.

Item
fn breadcrumb_jsonld(path : & str, page_title : & str, site_url : & str) -> String

SchemaOrgConfig

schema.org JSON-LD types + builders for public-page emission.

Item
pub struct SchemaOrgConfig
SchemaOrgConfig :: fn default() -> Self
fn local_business_jsonld(view : & SiteSettingsView, schema_org : & SchemaOrgConfig, site_url : & str,) -> String

SchemaOrgType:SchemaOrgType

schema.org JSON-LD types + builders for public-page emission.

Item
pub struct SchemaOrgType

SchemaOrgType:article

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn article() -> Self

SchemaOrgType:as

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn as_str(& self) -> & str

SchemaOrgType:blog

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn blog_posting() -> Self

SchemaOrgType:breadcrumb

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn breadcrumb_list() -> Self

SchemaOrgType:dive

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn dive_shop() -> Self

SchemaOrgType:faq

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn faq_page() -> Self

SchemaOrgType:fmt

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result

SchemaOrgType:local

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn local_business() -> Self

SchemaOrgType:new

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn new(value : impl Into <String>) -> EngineResult <Self>

SchemaOrgType:organization

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn organization() -> Self

SchemaOrgType:plumber

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn plumber() -> Self

SchemaOrgType:restaurant

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn restaurant() -> Self

SchemaOrgType:store

schema.org JSON-LD types + builders for public-page emission.

Item
SchemaOrgType :: fn store() -> Self

PreviewData

Sprint 0.36 US-0.36.3 — theme-neutral full-page draft preview render.

Item
pub struct PreviewData
fn render_preview_html(d : & PreviewData, frame : bool) -> String

BlogIndexView

Public-facing view-models. Consumer renders these to HTML

Item
pub struct BlogIndexView

BlogPostView

Public-facing view-models. Consumer renders these to HTML

Item
pub struct BlogPostView

GenericBusinessNap

Public-facing view-models. Consumer renders these to HTML

Item
pub struct GenericBusinessNap

PublicPageView

Public-facing view-models. Consumer renders these to HTML

Item
pub struct PublicPageView

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

application_cms

_88 modules: past 25 the diagram stops being readable, so the tree above is the complete picture._

Public surface

`crate root`

ItemWhat it is
pub struct CmsModuleCMS module — Layer 3 wrapper that registers CMS surfaces.
CmsModule :: fn new() -> Self
CmsModule :: fn name(& self) -> & 'static str
CmsModule :: fn version(& self) -> & 'static str
CmsModule :: fn migrations(& self) -> Vec <MigrationSet>
CmsModule :: async fn migrate_pending(& self, _pool : & PgPool) -> Result <u32, MigrationError>
CmsModule :: fn admin_router(& self) -> axum::Router <S>Relative CMS admin routes; the engine nests these under ADMIN_PREFIX.
CmsModule :: fn public_router(& self) -> axum::Router <S>Absolute CMS public surfaces: customer API under /api/v1/customer and the gated media endpoint (/media/a/...)

`api`

ItemWhat it is
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>, CmsAttachmentState : FromRef <S>, application_core::SiteConfig : FromRef <S>,Composed admin sub-router for the CMS surfaces
fn public_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,Composed public/customer sub-router for the CMS surfaces

`api::attachments_admin`

ItemWhat it is
pub struct ListQuery
pub struct AttachInput
pub struct UpdateSortOrderInput
pub struct ReorderInput
pub struct GrantRequest
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,

`api::attachments_customer`

ItemWhat it is
pub struct MeQuery
pub struct CustomerAttachInput
pub struct ViewQuery
pub struct CustomerGrantRequest
pub struct TargetQuery
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsAttachmentState : FromRef <S>,

`api::audiences_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,The audiences admin router

`api::blocks_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

`api::categories_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::content_serve`

ItemWhat it is
fn content_router(keyset : Keyset, media_root : impl Into <PathBuf>) -> RouterBuild the self-contained content-origin router

`api::docs_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, application_core::SiteConfig : FromRef <S>,

`api::downloads_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::downloads_public`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::logs`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,Build the logs JSON router

`api::media`

ItemWhat it is
pub struct UploadResponse
pub struct VariantOut
UploadResponse :: fn from(r : UploadResult) -> Self
pub struct AssetSummary
pub struct Asset
pub struct ListQuery
pub struct ListResponse
pub struct PageInfo
pub struct AssetPatch
pub struct DescribeInBody for POST /media/:id/describe — which fields to (re)generate
pub struct AltTextSuggestionInBody for POST /media/:id/alt-text-suggestion — what a drainer (the agent, or an external generator) writes after looking at the image.
AssetTextDto :: fn from(t : content_assets::AssetText) -> Self
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,Build the media JSON router

`api::media_serve`

ItemWhat it is
fn public_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,The public gated router (mount at root, session-optional)
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, CmsMediaState : FromRef <S>,The admin asset-browsing router (merged under the admin-authed prefix).

`api::pages_admin`

ItemWhat it is
pub struct AccessSettingsInput
pub struct GenerateTranslationInputBody for POST /pages/:id/translations/:locale/generate.
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::posts_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::posts_public`

ItemWhat it is
pub struct IndexQuery
pub struct FeedQuery
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::redirects_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::seo`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, application_core::SiteConfig : FromRef <S>,Composable router for the SEO surface
fn health_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,Tiny /health endpoint — JSON {"status":"ok"}

`api::settings`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,Settings admin routes

`api::sprint4`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

`api::state`

ItemWhat it is
pub struct CmsMediaStateState for the media router (media::router)
CmsMediaState :: fn new(media_root : impl Into <PathBuf>) -> SelfBuild from a media root, constructing the LocalStorage backend
CmsMediaState :: fn with_signing(mut self, signing : crate::media_serve_token::MediaSigning) -> SelfAttach the capability-token signing config (enables mint+302 delivery).
pub struct CmsAttachmentStateState for the attachment routers (attachments_admin, attachments_customer)
CmsAttachmentState :: fn new(pool : PgPool) -> SelfEngine defaults: the default policy registry + a Postgres audit sink over pool
CmsAttachmentState :: fn attachment_service(& self, pool : PgPool) -> AttachmentServiceConstruct an AttachmentService wired with this state's persistent audit sink
pub struct UploadLimitsUpload size + MIME constraints for the media/attachment routers
UploadLimits :: fn default() -> Self

`api::templates_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

`api::widgets_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static,

`cms::block_definitions`

ItemWhat it is
pub enum SlotTypeThe type of a declared block slot (Gate 1.5 Q4)
SlotType :: fn is_list(self) -> boolWhether the slot holds a list of items (true) or exactly one (false)
SlotType :: fn allowed_widget_keys(self) -> & 'static & 'static strThe widget keys this slot type accepts in the composer palette (Sprint 0.76 T7)
pub struct SlotDefinitionA declared slot on a block
pub struct BlockDefinitionOne block definition — the section-granularity analogue of a crate::cms::template_definitions::TemplateDefinition, with block-specific semantics layered on the shared field set.
fn blocks() -> & 'static BlockDefinitionParsed-once block registry
fn block(key : & str) -> Option <& 'static BlockDefinition>The block definition for key, or None for an unknown key

`cms::block_view`

ItemWhat it is
pub struct ComposedView<'a>Typed, read-only accessor over a composed page's ordered blocks.
ComposedView<'a> :: fn new(metadata : & 'a Value) -> ComposedView <'a>Build a view over a composed page's metadata
ComposedView<'a> :: fn blocks(& self) -> Vec <BlockInstance <'a>>The ordered block instances
pub struct BlockInstance<'a>One stored block instance: the block discriminator + stable id + the block's own fields, paired with its registry BlockDefinition (if known).
BlockInstance<'a> :: fn raw(& self) -> & 'a ValueThe raw stored block instance value (the JSON row), so a caller can pass it to a slot-widget renderer (Sprint 0.76 T7) that reads slots off it.
BlockInstance<'a> :: fn block_key(& self) -> & 'a strThe block type discriminator ("" if absent or the row is not an object).
BlockInstance<'a> :: fn id(& self) -> & 'a strThe stable instance id ("" if absent)
BlockInstance<'a> :: fn def(& self) -> Option <& 'static BlockDefinition>The registry definition for this instance's block key, or None for an unknown block type — the render path skips None (tolerant render).
BlockInstance<'a> :: fn str(& self, field : & str) -> & 'a strA scalar field of this block ("" when absent)
BlockInstance<'a> :: fn get(& self, field : & str) -> Option <& 'a str>Like BlockInstance::str but None for an absent/empty value.
BlockInstance<'a> :: fn markdown(& self, field : & str) -> StringA scalar field rendered from Markdown to sanitized HTML
BlockInstance<'a> :: fn url(& self, field : & str) -> & 'a strA URL-bearing scalar field, scheme-sanitized via sanitize_href: relative or http/https/mailto/tel pass through; any other scheme (javascript:/data:/…) yields ""
BlockInstance<'a> :: fn image(& self, field : & str) -> ResolvedImageA resolved block-level image field as a typed ResolvedImage (Sprint 0.98)
BlockInstance<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>The rows of a repeating field on this block, each wrapped in a RowView (reused from page_view)
BlockInstance<'a> :: fn slot(& self, slot_name : & str) -> Vec <WidgetInstance <'a>>The widgets stored in this block's slot_name slot, in order (Sprint 0.76 T7)

`cms::block_wireframes`

ItemWhat it is
fn block_wireframe(block_key : & str) -> Option <& 'static str>The ASCII wireframe for block_key, or None if no wireframe maps to that key

`cms::page_view`

ItemWhat it is
pub struct PageView<'a>Typed, read-only accessor over one page's template fields
PageView<'a> :: fn new(template_key : & str, metadata : & 'a Value) -> Option <PageView <'a>>Build a view for template_key over its metadata
PageView<'a> :: fn template_key(& self) -> & strThe template key this view renders.
PageView<'a> :: fn fields(& self) -> & FieldDefinitionEvery field the template defines — lets a consumer iterate generically (label/kind/name) instead of naming fields by hand.
PageView<'a> :: fn str(& self, field : & str) -> & 'a strA scalar field's value (text/textarea/markdown/url/select, or an already-resolved image URL)
PageView<'a> :: fn get(& self, field : & str) -> Option <& 'a str>Like PageView::str but None for an absent or empty value — handy for optional fields (view.get("hero_subheading")).
PageView<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>The rows of a repeating field, each wrapped in a RowView
PageView<'a> :: fn markdown(& self, field : & str) -> StringA scalar field rendered from markdown to sanitized HTML via markdown_to_html (pulldown-cmark + ammonia)
PageView<'a> :: fn url(& self, field : & str) -> & 'a strA URL-bearing scalar field, scheme-sanitized via sanitize_href: returns the value only if it is relative (/, #, ?, or scheme-less) or uses an allow-listed scheme (http/https/mailto/tel); any other scheme (notably javascript: / data: / vbscript:) yields ""
PageView<'a> :: fn image(& self, field : & str) -> ResolvedImageA resolved image field as a typed ResolvedImage (Sprint 0.98)
PageView<'a> :: fn services(& self) -> Vec <ServiceCard>The services repeater as typed ServiceCards
PageView<'a> :: fn sectors(& self) -> Vec <Sector>The sectors repeater as typed Sectors
PageView<'a> :: fn projects(& self) -> Vec <Project>The projects repeater as typed Projects
PageView<'a> :: fn faqs(& self) -> Vec <Faq>The faq_items repeater as typed Faqs
PageView<'a> :: fn contact_methods(& self) -> Vec <ContactMethod>The contact_methods repeater as typed ContactMethods
PageView<'a> :: fn team(& self) -> Vec <TeamMember>The team repeater as typed TeamMembers
pub struct ServiceCardA "what we do" / services-listing card (home + services templates).
pub struct SectorA development-sector card (sectors template)
pub struct ProjectA project gallery entry (projects template)
pub struct FaqOne FAQ entry (service template)
pub struct ContactMethodA contact-method row (contact template).
pub struct TeamMemberOne rendered team member (about template)
TeamMember :: fn initial(& self) -> StringFirst letter of the name, uppercased — for the placeholder monogram when there is no photo.
pub struct RowView<'a>One row of a repeating field
RowView<'a> :: fn from_value(row : & 'a Value) -> RowView <'a>Wrap a raw JSON value as a row view
RowView<'a> :: fn str(& self, field : & str) -> & 'a strAn object field of the row
RowView<'a> :: fn get(& self, field : & str) -> Option <& 'a str>Like RowView::str but None for absent/empty.
RowView<'a> :: fn value(& self) -> & 'a strThe bare value of a scalar-list row ("a","b""a")
RowView<'a> :: fn markdown(& self, field : & str) -> StringA row field rendered from markdown to sanitized HTML via markdown_to_html — the per-row analogue of PageView::markdown / BlockInstance::markdown
RowView<'a> :: fn url(& self, field : & str) -> & 'a strA URL-bearing row field, scheme-sanitized via sanitize_href — the per-row analogue of PageView::url
RowView<'a> :: fn image(& self, field : & str) -> ResolvedImageA resolved image row field as a typed ResolvedImage (Sprint 0.98) — the per-row analogue of PageView::image, for repeating image items (gallery.images.image, card_list.items.image).
fn sanitize_href(url : & str) -> & strScheme-sanitize a bare URL destined for an href/src

`cms::template_definitions`

ItemWhat it is
pub enum FieldKindField kind enum understood by the Leptos PageForm
pub struct FieldDefinition
pub struct TemplateDefinition
fn templates() -> & 'static TemplateDefinitionParsed-once template registry

`cms::widget_definitions`

ItemWhat it is
pub struct WidgetDefinitionOne widget definition — the unit-granularity analogue of a crate::cms::block_definitions::BlockDefinition, minus the block-specific semantics (no slots, no repeatable/max_count — a widget is a leaf).
WidgetDefinition :: fn partial(& self) -> StringThe kit render partial for this widget (forge/widgets/<key>.html)
fn widgets() -> & 'static WidgetDefinitionParsed-once widget registry
fn widget(key : & str) -> Option <& 'static WidgetDefinition>The widget definition for key, or None for an unknown key

`cms::widget_view`

ItemWhat it is
pub struct WidgetInstance<'a>One stored widget instance: the widget discriminator + stable id + the widget's own fields, paired with its registry WidgetDefinition (if known).
WidgetInstance<'a> :: fn from_value(row : & 'a Value) -> WidgetInstance <'a>Wrap a raw slot element as a widget instance
WidgetInstance<'a> :: fn widget_key(& self) -> & 'a strThe widget type discriminator ("" if absent or the row is not an object).
WidgetInstance<'a> :: fn id(& self) -> & 'a strThe stable instance id ("" if absent)
WidgetInstance<'a> :: fn image(& self, field : & str) -> ResolvedImageA resolved image field as a typed ResolvedImage (Sprint 0.98) — the widget analogue of crate::cms::block_view::BlockInstance::image
WidgetInstance<'a> :: fn def(& self) -> Option <& 'static WidgetDefinition>The registry definition for this instance's widget key, or None for an unknown widget type — the render path skips None (tolerant render).
WidgetInstance<'a> :: fn str(& self, field : & str) -> & 'a strA scalar field of this widget ("" when absent)
WidgetInstance<'a> :: fn get(& self, field : & str) -> Option <& 'a str>Like WidgetInstance::str but None for an absent/empty value.
WidgetInstance<'a> :: fn markdown(& self, field : & str) -> StringA scalar field rendered from Markdown to sanitized HTML
WidgetInstance<'a> :: fn repeater(& self, field : & str) -> Vec <RowView <'a>>The rows of a repeating field on this widget, each wrapped in a RowView (reused from page_view)
fn slot_widgets <'a>(block_row : & 'a Value, slot_name : & str) -> Vec <WidgetInstance <'a>>Read a block row's slot_name slot as an ordered list of WidgetInstance

`cms::widget_wireframes`

ItemWhat it is
fn widget_wireframe(widget_key : & str) -> Option <& 'static str>The ASCII wireframe for widget_key, or None if no wireframe maps to that key

`cms::wireframes`

ItemWhat it is
fn wireframe(template_key : & str) -> Option <& 'static str>The ASCII wireframe for template_key, or None if no wireframe maps to that key

`error`

ItemWhat it is
pub type CmsResult<T>: std::result::Result <T, CmsError>
pub type EngineResult<T>: CmsResult <T>Compatibility alias matching the original rust_cms_engine::error::EngineResult signature so extracted code keeps compiling unchanged.
pub enum CmsError

`jobs::describe_image`

ItemWhat it is
pub const PROMPT_VERSION: & strPrompt/model contract version
pub const ALT_MAX_CHARS: usizeHard cap on the concise alt text (WCAG-friendly; enforced in code, not just the prompt)
pub const MAX_OUTPUT_TOKENS: u32Max output tokens for the vision call (alt + short description fit easily).
pub const DESCRIBE_TENANT: UuidRe-export so the host worker uses the same system tenant as the variant job.
pub struct VisionAltTextParsed + validated vision result
fn accessibility_system_prompt_for_locale(locale : & str) -> StringThe image-text system prompt in the operator's locale (Sprint 0.83)
fn accessibility_system_prompt() -> StringThe image-text system prompt
fn build_ai_metadata(provider : & str, model : & str, result : & VisionAltText, source_sha256 : & str, generated_at_rfc3339 : & str,) -> serde_json::ValueBuild the ai_metadata JSONB value recording generation provenance.
fn pick_vision_variant(variants : & (String, String, String)) -> Option <(String, String)>Pick the best image variant to send to the vision model
fn quota_reached(used_today : i64, limit : u32) -> boolWhether today's usage has reached the daily quota
async fn daily_remaining(pool : & PgPool) -> Result <i64, MediaError>Remaining alt-text generations allowed today (i64::MAX when unlimited)
fn media_type_for_format(format : & str) -> StringMap a variant format to a MIME type for the vision request.
fn parse_vision_response(raw : & str) -> Result <VisionAltText, MediaError>Parse + validate the model's strict-JSON response into a VisionAltText
pub struct PendingAltTextA pending alt-text request the agent (or API poller) should fulfil
pub const ALL_FIELDS: & & strThe canonical generatable field keys, in display order.
async fn mark_pending(pool : & PgPool, asset_id : Uuid, fields : & & str,) -> Result <(), MediaError>Mark an image pending for the given fields (empty = all) so a drainer will fulfil it
async fn list_pending(pool : & PgPool, storage_root : & Path, limit : i64,) -> Result <Vec <PendingAltText>, MediaError>List up to limit oldest pending alt-text requests, each resolved to a concrete image path the drainer can read
pub struct AssetTextRevisionOne row of an asset's text-field version trail (US-0.54.7 history view).
async fn list_text_revisions(pool : & PgPool, asset_id : Uuid, limit : i64,) -> Result <Vec <AssetTextRevision>, MediaError>List an asset's text versions, newest first (for the History panel).
async fn revert_to_revision(pool : & PgPool, asset_id : Uuid, revision_id : Uuid, changed_by : Option <Uuid>,) -> Result <(), MediaError>Revert an asset's four text fields to a prior version's values (US-0.54.7)
async fn record_text_revision(pool : & PgPool, asset_id : Uuid, alt_text : & str, accessibility_description : & str, caption : & str, description : & str, source : & str, changed_by : Option <Uuid>,) -> Result <(), MediaError>Append a snapshot of an asset's text fields to the version trail (US-0.53.6)
fn ai_generate_event(asset_id : Uuid, provider : & str, model : & str, result : & VisionAltText,) -> application_audit_log::AuditLogBuild the ai.generate audit event for a completed generation (Sprint 0.54)
async fn record_suggestion(pool : & PgPool, asset_id : Uuid, result : & VisionAltText, provider : & str, model : & str,) -> Result <(), MediaError>
async fn record_localized_suggestion(pool : & PgPool, asset_id : Uuid, locale : & str, result : & VisionAltText, model : & str,) -> Result <(), MediaError>Record a generated vision result as suggested/needs_review SOURCE rows in the bilingual asset_text table (Sprint 0.83), in the operator's locale
async fn mark_failed(pool : & PgPool, asset_id : Uuid, err : & str) -> Result <(), MediaError>Flag a request failed (storage/AI/parse error)
async fn describe_with_provider(pool : & PgPool, provider : & Arc <dyn AiProvider>, storage_root : & Path, asset_id : Uuid,) -> Result <(), MediaError>Generate a suggestion for one asset using the injected vision provider (the key-gated API fallback)
async fn drain_via_provider(pool : & PgPool, provider : & Arc <dyn AiProvider>, storage_root : & Path,) -> Result <u32, MediaError>Drain the pending queue with the key-gated API provider (the autonomous fallback)

`jobs::describe_image::status`

ItemWhat it is
pub const NONE: & strNever requested.
pub const PENDING: & strRequested, awaiting a drainer (the agent, or the key-gated API poller).
pub const PROCESSING: & strClaimed by the API poller (atomic, so two drainers don't collide).
pub const COMPLETED: & strA suggestion was written.
pub const FAILED: & strGeneration failed (storage/AI/parse)

`jobs::translate_asset_text`

ItemWhat it is
pub const JOB_TYPE: & strinfrastructure-jobs job type string the worker dispatches on.
pub const TRANSLATE_TENANT: UuidNot tenant-scoped yet (mirrors variants::MEDIA_TENANT).
pub struct TranslateAssetTextPayloadEnqueued payload: which asset/kind to translate and in which direction.
pub enum TranslateAssetTextError
async fn run(pool : & PgPool, translator : & dyn Translator, payload : & TranslateAssetTextPayload,) -> Result <Option <TranslationOutcome>, TranslateAssetTextError>Run the job: load the confirmed source row, translate it, and write the target as machine_translation/needs_review (unless the target is human-confirmed, in which case it is preserved + marked stale)

`jobs::translate_page`

ItemWhat it is
pub const JOB_TYPE: & strinfrastructure-jobs job type string the worker dispatches on.
pub const TRANSLATE_TENANT: UuidTranslation is not tenant-scoped yet (mirrors variants::MEDIA_TENANT).
pub struct TranslatePagePayloadEnqueued payload: which page + locale to translate.
pub enum TranslateJobError
async fn run(pool : & PgPool, translator : & dyn Translator, payload : & TranslatePagePayload,) -> Result <bool, TranslateJobError>Run the job: load the page, translate the source-locale fields, render + sanitize the body, and upsert the target translation

`jobs::variants`

ItemWhat it is
pub const JOB_TYPE: & strQueue job_type for deferred variant generation.
pub const MEDIA_TENANT: UuidSystem tenant for media variant jobs
pub struct GenerateVariantsPayloadPayload for a JOB_TYPE job.
async fn run(pool : & PgPool, storage : & Arc <LocalStorage>, media_root : & Path, asset_id : Uuid,) -> Result <(), MediaError>Run the job: regenerate the full variant set for asset_id, idempotently

`media_serve_token`

ItemWhat it is
pub struct MintConfig<'a>Static mint configuration: the active signing key (kid + bytes), the cookieless content origin to redirect to, and the token TTL
pub struct ClaimsInputThe per-variant data the resolver/DB supplies to mint a token
fn mime_for(format : & str) -> & 'static strMap a variant container format to its MIME type
fn serve_type_and_disposition(content_type : & str) ->(String, Disposition)Decide the served (Content-Type, Disposition) for an asset's real content type (Sprint 0.64b, Gate 1.5)
fn sanitize_filename(name : & str) -> StringStrip a filename down to a header-safe, path-free token
fn content_disposition(disp : Disposition, filename : & str) -> StringThe Content-Disposition header value for a disposition + filename
fn build_claims(input : & ClaimsInput, cfg : & MintConfig, now : i64) -> ClaimsBuild the signed claim set from resolver data + config at time now
fn mint_redirect(input : & ClaimsInput, cfg : & MintConfig, now : i64,) -> Result <String, TokenError>Build claims, mint the token, and return the absolute 302 Location URL on the content origin: {content_origin}/c/{token} (trailing slash on the origin trimmed)
pub struct KeysetA kid → key set for verification
Keyset :: fn new(entries : Vec <(String, Vec <u8>)>) -> Self
Keyset :: fn get(& self, kid : & str) -> Option <Vec <u8>>The key for kid, if active
fn content_version(sha256 : Option <& str>, variant_id : Uuid) -> StringThe token's content_version: the variant sha256 when present (a still-valid token then can't serve replaced bytes), else a stable var:{id} fallback (the sha256 column is nullable for pre-009 rows).
pub struct MediaSigningOwned mint config held in app state
MediaSigning :: fn config(& self) -> MintConfig <'_>Borrow as the pure-layer MintConfig.
MediaSigning :: fn keyset(& self) -> KeysetThe single-key keyset that verifies tokens this config mints (kid → key).

`media_token`

ItemWhat it is
pub const MIN_SIGNING_KEY_LEN: usizeMinimum signing-key length, bytes (Sprint 0.93, R-floor)
pub enum DispositionContent-Disposition the content origin should emit for this variant.
pub struct ClaimsThe signed claim set: everything the stateless content origin needs to stream, and NO viewer identity.
pub enum TokenErrorWhy a token failed to verify
fn mint(claims : & Claims, key : & u8) -> Result <String, TokenError>Mint b64url(payload).b64url(hmac(payload))
fn verify(token : & str, keyset : impl Fn(& str) -> Option <Vec <u8>>, now : i64,) -> Result <Claims, TokenError>Verify a token against a keyset (kid → key) at time now

`media_urls`

ItemWhat it is
pub const DEFAULT_FEATURED_KIND: & strDefault variant size for hero / og featured images.
pub const UNRESOLVED_MEDIA_URL: & strFail-closed placeholder for a media URL built with no gating context
fn gated_attachment_url(attachment_id : Uuid, kind : & str) -> StringPublic, audience-gated URL for a page attachment's variant: /media/a/{attachment_id}/{kind} (mounted at root by the host)
fn public_asset_url(asset_id : Uuid, kind : & str) -> StringPublic, TIER-gated URL for an asset's display variant by ASSET id: /media/public/{asset_id}/{kind} (mounted at root by the host)
fn public_asset_url_fmt(asset_id : Uuid, kind : & str, format : & str) -> StringPublic, TIER-gated URL for an asset's display variant in a SPECIFIC container format: /media/public/{asset_id}/{kind}.{format} (Sprint 0.82-C)
fn gated_asset_url(asset_id : Uuid, kind : & str) -> StringStaff, permission-gated URL for browsing an asset's variant: /api/v1/admin/media/assets/{asset_id}/{kind}
pub const FEATURED_KIND_PREFERENCE: & & strLargest-first display preference — the detail/featured slot.
pub const THUMBNAIL_KIND_PREFERENCE: & & strSmallest-first display preference — grid cards and pickers.
fn best_available_kind <'a>(available : & String, preference : & & 'a str) -> Option <& 'a str>Pick the first kind in preference that the asset actually HAS

`middleware::referrer_log`

ItemWhat it is
async fn referrer_log_layer(State(pool) : State <PgPool>, req : Request <Body>, next : Next,) -> Response

`services::access_level`

ItemWhat it is
pub struct ViewerPer-request viewer context
Viewer :: fn anonymous() -> SelfAnonymous viewer — no session.
Viewer :: fn customer(party_id : Uuid, customer_roles : Vec <String>) -> SelfAuthenticated customer with the given party + customer roles.
Viewer :: fn staff(party_id : Uuid) -> SelfStaff viewer — bypasses checks.
pub enum AccessDecisionResult of an access check
pub trait EntitlementResolverHook for AccessLevel::Entitlement arm
pub struct NoopEntitlementResolverDefault fail-closed resolver
NoopEntitlementResolver :: async fn has_entitlements(& self, _party_id : Uuid, _required_entitlements : & String,) -> Result <bool, sqlx::Error>
async fn load_customer_roles(pool : & PgPool, party_id : Uuid,) -> Result <Vec <String>, sqlx::Error>Load a viewer's customer roles from the customer_role_memberships table
async fn check_page_access(page : & ContentPage, viewer : & Viewer, entitlement_resolver : & dyn EntitlementResolver,) -> Result <AccessDecision, sqlx::Error>Check whether viewer can access page
async fn update_page_access(pool : & PgPool, page_id : Uuid, access_level : AccessLevel, required_roles : Vec <String>, required_entitlements : Vec <String>,) -> Result <(), sqlx::Error>Update a page's access settings

`services::attachment_audit_sink`

ItemWhat it is
pub struct PostgresAuditSinkAudit sink that persists attachment events to the WORM attachment_audit_events table.
PostgresAuditSink :: fn new(pool : PgPool) -> Self
PostgresAuditSink :: async fn emit(& self, event : AuditEvent) -> Result <(), AssetError>
PostgresAuditSink :: fn is_persistent(& self) -> bool

`services::attachment_policies`

ItemWhat it is
pub struct OperatorOnlyPolicyOperator-only policy
OperatorOnlyPolicy :: fn cms_default() -> SelfDefault for CMS-style entities — cms.attachments.read + cms.attachments.write.
OperatorOnlyPolicy :: async fn can_attach(& self, ctx : & PolicyContext, _target_type : & str, _target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
OperatorOnlyPolicy :: async fn can_view(& self, ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
OperatorOnlyPolicy :: async fn can_manage(& self, ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
pub struct OwnerSelfPolicyOwner-self policy
OwnerSelfPolicy :: fn default_for_person() -> Self
OwnerSelfPolicy :: async fn can_attach(& self, ctx : & PolicyContext, _target_type : & str, target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
OwnerSelfPolicy :: async fn can_view(& self, ctx : & PolicyContext, attachment : & AttachmentRow,) -> Result <bool, AssetError>
OwnerSelfPolicy :: async fn can_manage(& self, ctx : & PolicyContext, attachment : & AttachmentRow,) -> Result <bool, AssetError>
pub struct FallbackDenyPolicyFallback policy used when no policy is registered for a target_type
FallbackDenyPolicy :: async fn can_attach(& self, _ctx : & PolicyContext, target_type : & str, _target_id : Uuid, _field_name : & str,) -> Result <AttachDecision, AssetError>
FallbackDenyPolicy :: async fn can_view(& self, _ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
FallbackDenyPolicy :: async fn can_manage(& self, _ctx : & PolicyContext, _attachment : & AttachmentRow,) -> Result <bool, AssetError>
pub struct PolicyRegistryRegistry of per-target_type policies
PolicyRegistry :: fn with_defaults() -> SelfNew registry with the operator-default policies pre- registered for engine-shipped entity types.
PolicyRegistry :: fn empty() -> SelfEmpty registry (no policies registered)
PolicyRegistry :: fn for_target_type(& self, target_type : & str) -> Arc <dyn AttachmentPolicy>Look up the policy for a target_type
PolicyRegistry :: fn default() -> Self

`services::attachments`

ItemWhat it is
async fn attach(pool : & PgPool, input : AttachInput) -> Result <AttachmentRow, AssetError>Attach an asset to a target
async fn list_for_entity(pool : & PgPool, entity_ref : & EntityRef,) -> Result <Vec <AttachmentWithAsset>, AssetError>
async fn get(pool : & PgPool, id : Uuid) -> Result <AttachmentRow, AssetError>
async fn set_primary(pool : & PgPool, id : Uuid) -> Result <AttachmentRow, AssetError>
async fn update_sort_order(pool : & PgPool, id : Uuid, new_sort_order : i32,) -> Result <AttachmentRow, AssetError>
async fn reorder(pool : & PgPool, entity_ref : & EntityRef, field_name : & str, ordered_ids : & Uuid,) -> Result <(), AssetError>
async fn detach(pool : & PgPool, id : Uuid) -> Result <(), AssetError>

`services::backdrop_pool`

ItemWhat it is
pub const BACKDROP_TAG: & strCanonical tag string for backdrop-pool membership
async fn pick_random(pool : & PgPool) -> Option <Uuid>Pick one random backdrop-eligible asset ID
async fn current_pool(pool : & PgPool) -> Vec <Uuid>Return the current pool IDs (TTL-cached)
fn invalidate_cache()Drop the cached pool

`services::backdrops`

ItemWhat it is
async fn is_dynamic_for_slug(pool : & PgPool, settings : & SiteSettingsView, slug : & str) -> boolDoes slug render dynamic HTML (random pool pick) that must bypass the static cache? Reads backdrop_assignments from the cached SiteSettingsView; the only DB hit is the cheap per-page legacy background_image_path lookup, and only when the slug has no direct assignment (i.e., when the walk-up to a parent section would otherwise apply)
pub struct ResolvedBackdropResolved backdrop for one page render
async fn resolve(pool : & PgPool, settings : & SiteSettingsView, slug : & str, legacy_fallback : & str,) -> ResolvedBackdropResolve the backdrop URL for a given slug
async fn public_image_url(pool : & PgPool, asset_id : Uuid) -> Option <String>Public, tier-gated /media/public/{asset_id}/{kind} URL for an image asset's best display variant — for SSR rendering of branding (the logo) and similar

`services::backdrops_admin`

ItemWhat it is
pub enum BackdropAdminError
pub enum Assignment
pub struct SlotEntry
async fn list_assignments(pool : & PgPool) -> Result <Vec <SlotEntry>, BackdropAdminError>
async fn get_assignment(pool : & PgPool, slug : & str) -> Result <Assignment, BackdropAdminError>
async fn set_assignment(pool : & PgPool, slug : & str, assignment : Assignment,) -> Result <(), BackdropAdminError>
async fn clear_assignment(pool : & PgPool, slug : & str) -> Result <(), BackdropAdminError>

`services::blog`

ItemWhat it is
pub struct PageCursorA cursor value
PageCursor :: fn new(value : impl Into <String>) -> Self
PageCursor :: fn as_str(& self) -> & str
pub struct Page<T>One page of results from a paginated service
pub struct PageInfoCursor pagination metadata
pub struct BlogQueryFilter + cursor + limit for blog queries

`services::categories`

ItemWhat it is
pub enum CategoryError
pub struct Category
pub struct UpsertCategoryInput
async fn list(pool : & PgPool) -> Result <Vec <Category>, CategoryError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Category>, CategoryError>
async fn create(pool : & PgPool, input : UpsertCategoryInput) -> Result <Category, CategoryError>
async fn update(pool : & PgPool, id : Uuid, input : UpsertCategoryInput,) -> Result <Category, CategoryError>
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), CategoryError>

`services::claude_cli`

ItemWhat it is
pub struct ClaudeCliProviderVision provider backed by the local claude CLI (subscription auth).
ClaudeCliProvider :: fn from_env() -> SelfResolve from the environment: CLAUDE_BIN (or claude on PATH) for the binary, ALT_TEXT_MODEL (default sonnet) for the model.
ClaudeCliProvider :: async fn complete(& self, request : CompletionRequest) -> Result <CompletionResponse>
ClaudeCliProvider :: fn is_available(& self) -> bool
ClaudeCliProvider :: fn name(& self) -> & 'static str
ClaudeCliProvider :: fn default_model(& self) -> & str

`services::cms`

ItemWhat it is
pub struct PostgresCmsBackend
pub struct BlogCategoryRow
PostgresCmsBackend :: fn new(pool : PgPool) -> Self
PostgresCmsBackend :: fn pool(& self) -> & PgPoolBorrow the underlying pool — used by helpers that take a &PgPool (e.g
PostgresCmsBackend :: async fn find_published_by_slug(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>The published page for slug, reconstructed from its published_version_id version's snapshot — NOT the live (draft) cms_pages columns
PostgresCmsBackend :: async fn find_by_slug_any_status(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>Lookup that ignores the version pair and reads the live (draft) columns — used by /admin/preview/:slug so drafts can be previewed before publish.
PostgresCmsBackend :: async fn list_published_posts(& self, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>Published posts ordered newest-first, paginated
PostgresCmsBackend :: async fn count_published_posts(& self) -> Result <i64, sqlx::Error>
PostgresCmsBackend :: async fn find_published_post_by_slug(& self, slug : & str,) -> Result <Option <ContentPage>, sqlx::Error>Single published post by slug
PostgresCmsBackend :: async fn list_posts_by_category(& self, category_id : Uuid, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn count_posts_by_category(& self, category_id : Uuid) -> Result <i64, sqlx::Error>
PostgresCmsBackend :: async fn list_posts_by_tag(& self, tag : & str, limit : i64, offset : i64,) -> Result <Vec <ContentPage>, sqlx::Error>
PostgresCmsBackend :: async fn count_posts_by_tag(& self, tag : & str) -> Result <i64, sqlx::Error>
PostgresCmsBackend :: async fn list_related_posts(& self, category_id : Option <Uuid>, exclude : Uuid, limit : i64,) -> Result <Vec <ContentPage>, sqlx::Error>Related posts in the same category (same-category, recency-ordered, excluding the source post)
PostgresCmsBackend :: async fn list_categories(& self) -> Result <Vec <BlogCategoryRow>, sqlx::Error>
PostgresCmsBackend :: async fn find_category_by_slug(& self, slug : & str,) -> Result <Option <BlogCategoryRow>, sqlx::Error>
PostgresCmsBackend :: async fn find_category_by_id(& self, id : Uuid,) -> Result <Option <BlogCategoryRow>, sqlx::Error>
PostgresCmsBackend :: async fn list_tags(& self) -> Result <Vec <String>, sqlx::Error>All distinct tags across published posts (for autocomplete)
PostgresCmsBackend :: async fn list_indexable(& self) -> Result <Vec <ContentPage>, sqlx::Error>Published, indexable pages for the sitemap — reconstructed from each page's published version.
PostgresCmsBackend :: async fn publish_page(& self, page_id : Uuid, user_id : Uuid) -> Result <bool, sqlx::Error>
PostgresCmsBackend :: async fn unpublish_page(& self, page_id : Uuid, user_id : Uuid) -> Result <bool, sqlx::Error>Unpublish: append an Unpublish version, clear published_version_id (the page leaves the public site) and the dead published_snapshot
PostgresCmsBackend :: async fn rollback_published(& self, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>Roll back: repoint published_version_id at version_id — a non-destructive pointer move (US-94)
PostgresCmsBackend :: async fn discard_draft(& self, page_id : Uuid) -> Result <bool, sqlx::Error>Discard draft changes: reset the live (draft) columns to the published version's snapshot and point draft_version_id back at published_version_id (US-95)
PostgresCmsBackend :: async fn record_draft_save(& self, page_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>Record a draft save: snapshot the current live (draft) columns into a Save version and advance draft_version_id to it — both in one transaction
async fn find_published_by_slug_localized(backend : & PostgresCmsBackend, slug : & str, lang : & str,) -> Result <Option <ContentPage>, sqlx::Error>

`services::cms_admin`

ItemWhat it is
pub enum CmsAdminError
pub enum TemplateKeyPage template key — maps 1:1 to the Postgres ENUM cms_template_key added in migration 073
TemplateKey :: fn json_key(& self) -> & 'static strThe template_definitions.json key string for this variant
pub struct PageSummary
pub struct TranslationSummary
pub struct Page
pub struct Translation
pub struct CreatePageInput
pub struct TranslationInput
pub struct UpdatePageInput
pub struct PatchTranslationInputPartial update body for patch_translation (Sprint 0.36 split-save)
pub struct ListFilter
pub enum ParentFilterparent_id level filter (Gate 1.5 R4)
pub enum ListModeWhich shape the Pages list returns
pub struct TreeMetaTree-mode metadata (Gate 1.5 R4)
pub struct PageListResult of list_pages
pub const DEFAULT_TREE_CAP: i64Default per-consumer cap for ListMode::Tree (Gate 1.5 R4)
async fn list_pages(pool : & PgPool, filter : ListFilter, cursor : Option <& str>, limit : i64, tree_cap : i64,) -> Result <PageList, CmsAdminError>List pages in one of three modes (Gate 1.5 R4, Sprint 0.35), resolved from the filter by precedence: - q or status present → ListMode::Flat (updated_at DESC, id keyset; no tree); - else parent_id present → ListMode::Level (one level of the tree; (sort_order, slug, id) keyset; depth 0); - else → ListMode::Tree: fetch tree_cap + 1; a COMPLETE set (len <= cap) is assembled by tree_order; a TRUNCATED set degrades to level roots with tree.truncated = true
async fn get_page(pool : & PgPool, id : Uuid) -> Result <Option <Page>, CmsAdminError>
fn slugify(title : & str) -> StringDerive a URL-friendly slug from an arbitrary title
fn html_to_markdown(html : & str) -> StringMinimal HTML→markdown for the editor body fallback (Sprint 3 US-3.1)
fn markdown_to_html(src : & str) -> StringRender markdown to sanitized HTML — the canonical forward direction, mirroring html_to_markdown
async fn create_page(pool : & PgPool, input : CreatePageInput, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn update_page(pool : & PgPool, id : Uuid, patch : UpdatePageInput, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn patch_translation(pool : & PgPool, page_id : Uuid, locale : & str, patch : PatchTranslationInput, actor_id : Option <Uuid>,) -> Result <Translation, CmsAdminError>Partially update one page translation (Sprint 0.36 split-save, PATCH /pages/:id/translations/:locale)
async fn build_preview_data(pool : & PgPool, page : & Page, locale : Option <& str>,) -> Result <crate::views::preview::PreviewData, CmsAdminError>Assemble the working-copy preview data for one locale (Sprint 0.36 US-0.36.3)
async fn publish_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn unpublish_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
async fn soft_delete_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <(), CmsAdminError>
async fn restore_page(pool : & PgPool, id : Uuid, actor_id : Option <Uuid>,) -> Result <Page, CmsAdminError>
pub enum PurgeStrategyPurge strategy when a page has children (Gate 1.5: the operator MUST choose explicitly — the two paths have opposite intent).
pub struct PagePurgePlanWhat a single-page purge would do, computed against the live table
pub struct TrashOutcomeOutcome of an empty-trash purge (--trashed).
async fn plan_page_purge(pool : & PgPool, id : Uuid, strategy : Option <PurgeStrategy>, include_live_target : bool, include_live_subtree : bool,) -> Result <PagePurgePlan, CmsAdminError>Plan a single-page hard-delete (forge pages purge <ID>)
async fn execute_page_purge(pool : & PgPool, plan : & PagePurgePlan, actor_id : Option <Uuid>,) -> Result <(), CmsAdminError>Execute a planned single-page purge in ONE transaction: reparent children to root first (trigger-safe — the 083 cycle trigger early-exits on NULL), then hard-delete bottom-up, writing a cms_page.purge audit row before each delete.
async fn purge_trashed(pool : & PgPool, dry_run : bool, actor_id : Option <Uuid>,) -> Result <TrashOutcome, CmsAdminError>Empty-trash purge (forge pages purge --trashed)
pub struct TrashPlanResult of planning an "empty trash" purge (forge pages purge --trashed, Sprint 0.35 T-0.35.5)

`services::cms_versions`

ItemWhat it is
async fn write_version <'e, E>(executor : E, version_id : Uuid, page_id : Uuid, snapshot : & JsonValue, reason : VersionReason, saved_by : Option <Uuid>, summary : & str,) -> Result <Uuid, sqlx::Error> where E : sqlx::PgExecutor <'e>,Append a row to the immutable cms_page_versions log with an explicit (caller-generated) version_id — so the caller can point cms_pages.{published,draft}_version_id at it without a second round-trip
async fn fetch_versions(pool : & PgPool, page_id : Uuid) -> Vec <PageVersion>All versions of a page, newest first.
async fn fetch_version(pool : & PgPool, page_id : Uuid, version_id : Uuid) -> Option <PageVersion>One specific version by id, guarded against cross-page-pointer drift (page_id must match).
pub struct DiffRowOne row of a side-by-side diff
fn build_side_by_side_diff(left : & str, right : & str) -> Vec <DiffRow>Build a line-based side-by-side diff of two texts
fn canonicalize_json(value : & JsonValue) -> StringCanonical pretty-printed JSON: key-sorted recursively so a metadata block that differs only by key insertion order produces no diff rows.
fn snapshot_to_diff_text(snapshot : & PublishSnapshot) -> StringSerialize the diff-relevant fields of a snapshot to deterministic text for build_side_by_side_diff
pub struct VersionDiffA resolved side-by-side diff with a human label for each side.
async fn set_published_version(pool : & PgPool, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <bool, sqlx::Error>Set-published: repoint published_version_id at version_id — a non-destructive pointer move that leaves the working draft untouched (Gate 1.5 Q3 set-published)
pub struct RestoreDraftColsThe page-level working-copy column values restore_draft_from_version writes to cms_pages from a chosen version's snapshot
fn restore_draft_columns(snapshot : & PublishSnapshot) -> RestoreDraftColsPure projection of a snapshot onto the restore-draft column set
pub enum RestoreOutcomeOutcome of restore_draft_from_version.
async fn restore_draft_from_version(pool : & PgPool, page_id : Uuid, version_id : Uuid, user_id : Uuid,) -> Result <RestoreOutcome, sqlx::Error>Restore the working copy from a chosen version's snapshot, append a revert version row, and advance draft_version_id to it — all in one transaction
async fn diff_versions(pool : & PgPool, page_id : Uuid, version_id : Uuid, against : & str,) -> Result <Option <VersionDiff>, sqlx::Error>Resolve a side-by-side diff of version_id against a target

`services::docs`

ItemWhat it is
pub struct DocsConfigConsumer-supplied docs viewer configuration
pub enum FileKind
pub enum TreeNode
pub enum PathError
pub enum DocsError
fn tree(cfg : & DocsConfig, can_see_operator_only : bool) -> Vec <TreeNode>Walk the docs root and produce a tree visible to a viewer with can_see_operator_only capability
fn is_accessible(cfg : & DocsConfig, rel_path : & str, abs : & Path, can_see_operator_only : bool,) -> boolWhether a viewer can see rel_path
fn resolve(cfg : & DocsConfig, rel_path : & str, can_see_operator_only : bool,) -> Result <PathBuf, PathError>Validate + resolve a user-supplied relative path under the docs root
fn render_markdown(abs : & Path, rel_path : & str) -> Result <(String, String), DocsError>Read a markdown file and return its title (first # line) + sanitized HTML (via crate::services::markdown::render).
fn breadcrumb(rel_path : & str) -> Vec <(String, String)>Path segments for breadcrumb rendering
fn mime_for(p : & Path) -> & 'static strBest-effort MIME for an attachment served from disk

`services::downloads`

ItemWhat it is
pub enum DownloadsError
pub struct Download
pub struct CreateDownloadInput
pub struct UpdateDownloadInput
async fn list_all(pool : & PgPool) -> Result <Vec <Download>, DownloadsError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Download, DownloadsError>
async fn create(pool : & PgPool, input : CreateDownloadInput) -> Result <Download, DownloadsError>
async fn update(pool : & PgPool, id : Uuid, input : UpdateDownloadInput,) -> Result <Download, DownloadsError>
async fn soft_delete(pool : & PgPool, id : Uuid) -> Result <(), DownloadsError>
async fn list_published(pool : & PgPool) -> Result <Vec <Download>, DownloadsError>
async fn get_by_slug(pool : & PgPool, slug : & str) -> Result <Download, DownloadsError>

`services::featured_attachment`

ItemWhat it is
async fn sync_featured_attachment(conn : & mut PgConnection, page_id : Uuid, lang : & str, featured_image_id : Option <Uuid>,) -> Result <(), sqlx::Error>Sync the featured:{lang} attachment of page_id to match featured_image_id

`services::markdown`

ItemWhat it is
fn render(markdown : & str) -> StringRender markdown to sanitized HTML
fn render_unsanitized(markdown : & str) -> StringRender markdown to HTML WITHOUT sanitization
fn sanitize_html(input : & str) -> StringRun untrusted HTML through ammonia with the engine's default allowlist

`services::media`

ItemWhat it is
pub const MAX_DIMENSION: u32Per-dimension cap — owned by the library crate (re-exported for the API layer).
pub const MAX_SIZE_BYTES: usizeUpload size cap — owned by the library crate (re-exported so the API body-limit layer can size its limit relative to it).
pub enum MediaError
MediaError :: fn from(e : sqlx::Error) -> Self
MediaError :: fn from(e : IngestError) -> Self
MediaError :: fn from(e : AssetError) -> Self
pub const ALL_VARIANT_KINDS: & & strEvery display variant kind, in library crate SIZES order
pub struct MediaSettingsMedia-module settings (Sprint 0.49), stored in module_settings under module "media", key "config"
MediaSettings :: fn auto_fields(& self) -> Vec <& 'static str>The set of fields auto-generated on upload (per the toggles)
MediaSettings :: fn default() -> Self
MediaSettings :: fn is_async(& self) -> boolTrue when variant generation is deferred to a background job.
MediaSettings :: fn immediate_kinds(& self) -> & 'static & 'static strVariant kinds to generate in-request
fn sniff_image_format(bytes : & u8) -> Option <& 'static str>Returns the format name based on magic-byte sniff
pub struct UploadResultFinal result of the upload pipeline.
UploadResult :: fn from(r : content_assets::ingest::UploadResult) -> Self
async fn ingest(pool : & PgPool, storage : & Arc <LocalStorage>, _storage_root : & std::path::Path, bytes : Vec <u8>, declared_mime : & str, original_filename : & str, uploaded_by_id : Option <Uuid>, immediate_kinds : & & str,) -> Result <UploadResult, MediaError>Ingest an image upload (Sprint 0.81: thin wrapper)
async fn ingest_blob(pool : & PgPool, storage : & Arc <LocalStorage>, bytes : Vec <u8>, declared_mime : & str, original_filename : & str, uploaded_by_id : Option <Uuid>,) -> Result <UploadResult, MediaError>
async fn regenerate_variants_for_asset(pool : & PgPool, storage : & Arc <LocalStorage>, _storage_root : & std::path::Path, asset_id : Uuid,) -> Result <usize, MediaError>
async fn recrop_variants_for_asset(pool : & PgPool, storage : & Arc <LocalStorage>, asset_id : Uuid,) -> Result <usize, MediaError>Re-CROP an existing asset's display variants from its retained private original, applying the asset's CURRENT focal point

`services::media_access`

ItemWhat it is
pub struct ServeTargetThe variant the resolver chose to stream.
pub enum ServeOutcomeThe outcome of resolving a gated request.
pub enum MediaAccessErrorResolution failure: infrastructure vs
async fn build_request_viewer(pool : & PgPool, authenticated : bool, user_id : Option <Uuid>,) -> Result <Viewer, MediaAccessError>Build the resolver Viewer for a request from the session + RBAC tables
async fn resolve_attachment_serving(pool : & PgPool, attachment_id : Uuid, kind : & str, viewer : & Viewer,) -> Result <ServeOutcome, MediaAccessError>Resolve a gated GET /media/a/{attachment_id}/{kind} request end to end

`services::media_audience`

ItemWhat it is
pub enum AudienceErrorResolution failure: infrastructure vs
async fn build_actor_subjects(pool : & PgPool, surface : Surface, authenticated : bool, user_id : Option <Uuid>,) -> Result <ActorSubjects, AudienceError>Build the request's ActorSubjects ONCE (Q2 — no per-grant N+1)
async fn load_asset_state(pool : & PgPool, asset_id : Uuid, kind : & str,) -> Result <AssetState, AudienceError>Load the asset's live serve-state for the requested kind (fresh every request — never cached)
async fn load_active_grants(pool : & PgPool, asset_id : Uuid, action : Action,) -> Result <Vec <ActiveGrant>, AudienceError>Load the asset's active grants, pre-filtered by the exact active predicate (content_assets::ACTIVE_GRANT_PREDICATE) + the action capability clause, using DB time
async fn evaluate_asset_serving(pool : & PgPool, asset_id : Uuid, kind : & str, surface : Surface, action : Action, authenticated : bool, user_id : Option <Uuid>,) -> Result <Decision, AudienceError>The single default-deny entry point every non-public byte route calls before emitting any URL/stream
pub struct PublicServeTargetA resolved public-attachment serve target (the byte coordinates to mint a token for)
pub enum PublicServeOutcomeThe outcome of resolving a public /media/a/{attachment}/{kind} request through the single asset-level evaluator (Sprint 0.77 R1).
async fn resolve_public_attachment_serving(pool : & PgPool, attachment_id : Uuid, kind : & str,) -> Result <PublicServeOutcome, AudienceError>Resolve a public /media/a/{attachment_id}/{kind} request through the single asset-level evaluator (Sprint 0.77 R1 — closes the Q3 split-brain)
async fn resolve_public_asset_serving(pool : & PgPool, asset_id : Uuid, kind : & str,) -> Result <PublicServeOutcome, AudienceError>Resolve a public /media/public/{asset_id}/{kind} request by ASSET id, TIER-ONLY (no grant path, no attachment context)
async fn list_grants(pool : & PgPool, asset_id : Uuid,) -> Result <Vec <AssetAudienceGrant>, AudienceError>List an asset's grants (active + historical), newest first
async fn create_grant(pool : & PgPool, mut input : GrantInput, granted_by : Option <Uuid>,) -> Result <AssetAudienceGrant, AudienceError>Create a grant
async fn revoke_grant(pool : & PgPool, asset_id : Uuid, grant_id : Uuid, revoked_by : Option <Uuid>,) -> Result <bool, AudienceError>Revoke a grant (soft — sets revoked_at/revoked_by; never hard-deletes, so the audit trail survives)
pub struct AudienceTargetA pickable audience target for the grant UI (Sprint 0.77).
async fn audience_targets(pool : & PgPool, surface : Surface,) -> Result <Vec <AudienceTarget>, AudienceError>List the pickable audience targets for a surface (Q2 — surface gates kinds)
async fn filter_public_render_map(pool : & PgPool, map : & mut std::collections::HashMap <Uuid, Uuid>, kind : & str,) -> Result <(), AudienceError>Filter a page's asset_id → attachment_id render map down to assets the public render path may emit a URL for (Sprint 0.77, Q1/Q4: the public-image invariant BY CONSTRUCTION)

`services::media_field_attachment`

ItemWhat it is
pub const MEDIA_FIELD_NAME: & strThe single page-wide attachment field_name bucket for metadata image fields
async fn resync_page_media_attachments(conn : & mut PgConnection, page_id : Uuid,) -> Result <(), sqlx::Error>Reconcile the page-wide mediafield bucket to the assets referenced by the page's canonical metadata (base + all locales)
async fn sync_media_field_attachments(conn : & mut PgConnection, page_id : Uuid, asset_ids : & Uuid,) -> Result <(), sqlx::Error>Reconcile the mediafield bucket of page_id to exactly asset_ids
async fn load_page_media_map(pool : & sqlx::PgPool, page_id : Uuid,) -> Result <crate::services::media_resolve::AttachmentMap, sqlx::Error>Load a page's live mediafield attachments as an asset_id → attachment_id map for the render resolver

`services::media_resolve`

ItemWhat it is
pub const ASSET_REF_PREFIX: & strThe asset:// sentinel prefix that marks a typed asset reference.
pub enum MediaRefA parsed metadata field value.
pub enum ResolvedMediaThe outcome of resolving a field value against a page's attachments.
pub type AttachmentMap: HashMap <Uuid, Uuid>asset_id → attachment_id for one page's live mediafield attachments.
pub type VariantMap: HashMap <Uuid, Vec <content_assets::variants_read::VariantInfo>>asset_id → its public display variant rows (Sprint 0.98)
fn parse_ref(value : & str) -> MediaRefDiscriminate a raw field value
fn ref_asset_id(value : & str) -> Option <Uuid>The asset id a field value references, if any (sentinel or bare uuid).
fn resolve(value : & str, attachments : & AttachmentMap, kind : & str) -> ResolvedMediaResolve a field value to its display outcome against attachments
fn collect_field_asset_ids(def : & TemplateDefinition, metadata : & serde_json::Value,) -> Vec <Uuid>Collect the distinct asset ids referenced by asset:// sentinels (or bare uuids) across a template's image fields in one metadata object
fn rewrite_metadata_media(def : & TemplateDefinition, metadata : & mut serde_json::Value, attachments : & AttachmentMap, variants : & VariantMap, kind : & str,)Rewrite every image-field value in metadata in place to its resolved display form: asset refs with a live attachment become the gated URL; legacy URLs are left unchanged; cleared/unknown/no-attachment refs become an empty string (the template's truthiness check then renders no image — fail-closed)
fn collect_block_asset_ids(metadata : & serde_json::Value) -> Vec <Uuid>Collect the distinct asset ids referenced across a composed page's blocks array (Sprint 0.76)
fn rewrite_blocks_media(metadata : & mut serde_json::Value, attachments : & AttachmentMap, variants : & VariantMap, kind : & str,)Rewrite every image-field value inside a composed page's blocks array in place to its resolved display form (Sprint 0.76), the block-aware analogue of rewrite_metadata_media

`services::media_settings`

ItemWhat it is
pub struct MediaVariantSettingsTyped view of the single media_settings row
MediaVariantSettings :: fn default() -> Self
MediaVariantSettings :: fn is_async(& self) -> boolTrue when variant generation is deferred to the background worker.
MediaVariantSettings :: fn immediate_kinds(& self) -> & 'static & 'static strThe display kinds to materialize in-request
async fn get(pool : & PgPool) -> Result <MediaVariantSettings, sqlx::Error>Read the single media_settings row
async fn get_or_default(pool : & PgPool) -> MediaVariantSettingsRead the row, falling back to the safe default on ANY error (a malformed/ missing row must never break an upload)
async fn set(pool : & PgPool, s : & MediaVariantSettings) -> Result <(), sqlx::Error>Upsert the single media_settings row

`services::module_settings`

ItemWhat it is
pub enum ModuleSettingsErrorErrors from the module-settings store.
async fn get <T : DeserializeOwned>(pool : & PgPool, module : & str, key : & str,) -> Result <Option <T>, ModuleSettingsError>Reads a module setting, deserialized to T
async fn get_or <T : DeserializeOwned>(pool : & PgPool, module : & str, key : & str, default : T) -> TReads a module setting or falls back to default
async fn set <T : Serialize>(pool : & PgPool, module : & str, key : & str, value : & T,) -> Result <(), ModuleSettingsError>Upserts a module setting from a serializable value (keyed by module,key)

`services::pdf_sanitize`

ItemWhat it is
pub const SANITIZE_MAX_BYTES: usizeHard cap on PDF bytes accepted for sanitization (matches the blob upload cap).
pub struct PdfSanitizerA PDF sanitizer backed by an external tool (default: mutool).
pub enum SanitizeErrorA sanitization failure
PdfSanitizer :: fn default() -> Self
PdfSanitizer :: fn from_env() -> SelfResolve from env: MUTOOL_BIN (default /usr/bin/mutool), 30s timeout.
PdfSanitizer :: fn binary(& self) -> & strThe configured binary's path.
PdfSanitizer :: fn available(& self) -> boolIs the sanitizer binary present (absolute path exists)? Lets callers decide policy when the tool is absent rather than silently skipping.
PdfSanitizer :: fn args(input : & str, output : & str) -> Vec <String>The mutool clean argument vector (pure — testable without spawning)
PdfSanitizer :: async fn sanitize(& self, input : & u8) -> Result <Vec <u8>, SanitizeError>Sanitize input PDF bytes → stripped PDF bytes
PdfSanitizer :: fn handles(& self, content_type : & str) -> bool
PdfSanitizer :: async fn sanitize(& self, _content_type : & str, bytes : & u8,) -> Result <Vec <u8>, content_assets::error::AssetError>
TempDir :: fn drop(& mut self)

`services::posts`

ItemWhat it is
pub enum PostError
pub struct PostEngine-side row struct that maps a cms_pages WHERE page_type='post' row to the wire format
Post :: fn metadata_as <T>(& self) -> Result <T, serde_json::Error> where T : serde::de::DeserializeOwned,Deserialize this post's metadata JSONB column into a vertical-specific typed struct
pub struct CreatePostInput
pub struct UpdatePostInput
pub struct ListFilter
async fn list(pool : & PgPool, filter : ListFilter) -> Result <Vec <Post>, PostError>List posts
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Post>, PostError>
async fn get_by_slug(pool : & PgPool, slug : & str) -> Result <Option <Post>, PostError>
async fn create(pool : & PgPool, input : CreatePostInput, actor_id : Option <Uuid>,) -> Result <Post, PostError>
async fn update(pool : & PgPool, id : Uuid, patch : UpdatePostInput) -> Result <Post, PostError>
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), PostError>Soft delete (sets deleted_at)

`services::public_reader`

ItemWhat it is
pub struct PublicPageContentThe slice of a published CMS page the public site renders
pub trait PublicPageReaderPublished-only CMS read facade
pub struct PostgresPublicPageReaderPostgres-backed PublicPageReader
PostgresPublicPageReader :: fn new(pool : PgPool) -> Self
PostgresPublicPageReader :: async fn get_page_by_slug(& self, lang : & str, slug : & str) -> Option <PublicPageContent>

`services::redirects`

ItemWhat it is
pub enum RedirectError
pub struct Redirect
pub struct UpsertRedirectInput
async fn list(pool : & PgPool) -> Result <Vec <Redirect>, RedirectError>
async fn get(pool : & PgPool, id : Uuid) -> Result <Option <Redirect>, RedirectError>
async fn create(pool : & PgPool, input : UpsertRedirectInput) -> Result <Redirect, RedirectError>
async fn update(pool : & PgPool, id : Uuid, input : UpsertRedirectInput,) -> Result <Redirect, RedirectError>
async fn delete(pool : & PgPool, id : Uuid) -> Result <(), RedirectError>
async fn resolve(pool : & PgPool, from : & str) -> Result <Option <(String, bool)>, RedirectError>Resolve a request path against the redirect table

`services::renditions`

ItemWhat it is
pub const FLOOR_MAX_PX: u32Default floor geometry: small + heavily blurred so it reads as a teaser, not a usable copy.
pub const FLOOR_BLUR_SIGMA: f32
fn blur_floor_jpeg(bytes : & u8, max_px : u32, sigma : f32) -> Result <Vec <u8>, MediaError>Produce a blurred-floor JPEG from source image bytes (pure, IO-free)
async fn generate_blur_floor(pool : & PgPool, storage : & Arc <LocalStorage>, asset_id : Uuid,) -> Result <Uuid, MediaError>Generate + store a blurred floor variant for an image asset and return its variant id (Sprint 0.70)

`services::responsive_images`

ItemWhat it is
pub enum SlotProfileA render slot
pub struct PictureMarkupThe result of a <picture> render
fn render_picture(asset_id : Uuid, profile : SlotProfile, available : & VariantInfo, alt : & str,) -> PictureMarkupPure <picture> markup builder (no DB)
async fn variant_kind_exists(pool : & PgPool, asset_id : Uuid, kind : & str) -> boolTrue iff a non-deleted, public variant of (asset_id, kind) exists in ANY format
async fn resolve_picture(pool : & PgPool, asset_id : Uuid, profile : SlotProfile, alt : & str,) -> PictureMarkupAsync convenience: load the asset's public variants (variants_read::get_variants) then call render_picture
SlotProfile :: fn from_slot_name(name : Option <& str>) -> SlotProfileMap a registry slot_profile annotation to a profile
pub struct ResolvedImageThe render-contract type for ONE resolved image (Sprint 0.98 Gate-1.5 Q1/Q2)
ResolvedImage :: fn has_picture(& self) -> boolTrue when a responsive <picture> is available (the preferred render).
ResolvedImage :: fn has_image(& self) -> boolTrue when anything renders — a <picture> or at least a fallback url.
fn resolved_image(asset_id : Uuid, profile : SlotProfile, alt : & str, available : & VariantInfo, url : String,) -> ResolvedImagePure builder: package a slot's <picture> (from render_picture) plus the single fallback url + alt into a ResolvedImage

`services::scan`

ItemWhat it is
pub enum AvModeAV operating mode (Gate 1.5: explicit, never a silent fail-open).
AvMode :: fn from_env() -> SelfResolve the mode from AV_MODE (requiredAvMode::Required; anything else / unset → AvMode::DisabledTrusted, the safe-for-dev default).
AvMode :: fn ingest_status(self) -> & 'static strThe scan_status a freshly-ingested asset receives under this mode.
AvMode :: fn ingest_engine(self) -> Option <& 'static str>The scan_engine provenance stamped at ingest (honest audit trail).
pub enum ScanVerdictA scanner's verdict on a stream of bytes.
pub enum ScanErrorA scan failure (NOT a clean/infected verdict)
fn status_after_scan(result : & Result <ScanVerdict, ScanError>) -> & 'static strThe scan_status to persist after a scan attempt (pure — Gate 1.5: an error of any kind becomes failed, never pending/clean).
fn scan_allows_serve(scan_status : & str) -> boolWhether an asset's scan_status permits serving its bytes
pub struct ClamdScannerA ClamAV clamd scanner over the INSTREAM protocol (TCP)
ClamdScanner :: fn new(addr : impl Into <String>) -> Self
ClamdScanner :: async fn scan(& self, bytes : & u8) -> Result <ScanVerdict, ScanError>Scan bytes via clamd zINSTREAM
fn parse_clamd_response(resp : & str) -> Result <ScanVerdict, ScanError>Parse a clamd INSTREAM response line into a verdict (pure, testable without a daemon)

`services::search`

ItemWhat it is
pub enum SearchError
pub enum SearchHit
pub struct FacetCountPer-entity facet count.
pub struct SearchResponseUniversal search response
async fn search(pool : & PgPool, q : & str, types : Option <& String>, limit_per_type : i64,) -> Result <SearchResponse, SearchError>Run the universal search

`services::search_console`

ItemWhat it is
pub struct SearchConsoleQueryQuery parameters for a Search Console facts retrieval
pub struct SearchConsoleFactOne row of Search Console facts
pub trait SearchConsoleProviderThe trait the engine consumes when a consumer wires up GSC integration
pub struct NullSearchConsoleProviderNo-op provider for consumers that haven't wired up GSC
NullSearchConsoleProvider :: async fn fetch_facts(& self, _query : SearchConsoleQuery,) -> EngineResult <Vec <SearchConsoleFact>>

`services::seo`

ItemWhat it is
fn resolve_seo_backfill(page_level : Option <& str>, locale_value : Option <& str>,) -> Option <String>Resolve one SEO field's backfill value for a locale (Round A #3)
fn is_seo_backfill_conflict(page_level : Option <& str>, locale_value : Option <& str>) -> boolTrue when a backfill row is a conflict worth logging before the destructive consolidation: both sides present and different (don't silently clobber hand-optimized page-level SEO — Round A #3, Gemini's sharpening).
pub enum DraftStateDraft lifecycle state for the editor banner (Round B #2).
fn compute_draft_state(published_at : Option <chrono::DateTime <chrono::Utc>>, published_snapshot_hash : Option <& str>, working_copy_hash : & str,) -> DraftStateCompute the draft state from publish metadata + content hashes (Round B #2 — hash, not timestamp, so non-content updated_at bumps don't show a false "unpublished edits" banner)
fn snapshot_schema_version(snapshot : & Value) -> u32Infer a published-snapshot's schema version (Round A #2)

`services::site_settings`

ItemWhat it is
pub struct SiteSettingsViewCached view of the site_settings singleton
SiteSettingsView :: fn phone_display(& self) -> StringE.164 → human display, e.g
fn invalidate_cache()Drop the cached view
async fn site_settings(pool : & PgPool) -> SiteSettingsViewRead the singleton site_settings row, with 60s in-process cache

`services::sitemap`

ItemWhat it is
pub struct ExtraRoute<'a>Extra sitemap route the consumer wants in the emitted XML, not backed by a cms_pages row
async fn sitemap_xml_string(cms : & PostgresCmsBackend, site_url : & str, extra_routes : & ExtraRoute <'_>,) -> StringBuild the sitemap XML body without wrapping in a Response, so the static-cache pipeline can write it to disk
fn robots_txt_body(site_url : & str, is_staging : bool) -> Stringrobots.txt body

`services::tags`

ItemWhat it is
pub enum TagError
pub struct Tag
async fn list_tags(pool : & PgPool, q : Option <& str>, limit : i64) -> Result <Vec <Tag>, TagError>
async fn upsert_tag(pool : & PgPool, slug : & str, label : & str) -> Result <Tag, TagError>Create-or-return existing tag by slug
async fn set_asset_tags(pool : & PgPool, asset_id : Uuid, tag_slugs : & String,) -> Result <(), TagError>Set the tag set for an asset to exactly tag_slugs

`services::translations`

ItemWhat it is
pub struct TranslationRowOne translation row
TranslationRow :: fn to_locale_snapshot(& self) -> content_cms::LocaleSnapshotProject this row onto the generic content_cms::LocaleSnapshot captured in a version (Sprint 0.47)
async fn find_for_page(pool : & PgPool, page_id : Uuid, lang : & str,) -> Result <Option <TranslationRow>, sqlx::Error>Fetch a single translation row for (page_id, lang)
async fn list_for_page(pool : & PgPool, page_id : Uuid,) -> Result <Vec <TranslationRow>, sqlx::Error>All translation rows for a page, ordered by lang
async fn upsert <'e, E>(executor : E, page_id : Uuid, lang : & str, metadata : & JsonValue, snapshot : & JsonValue, seo_title : & str, seo_description : & str, canonical_url : & str, og_image_url : & str, featured_image_id : Option <Uuid>,) -> Result <bool, sqlx::Error> where E : sqlx::PgExecutor <'e>,Insert-or-update a translation row
async fn retain_langs <'e, E>(executor : E, page_id : Uuid, keep : & String,) -> Result <u64, sqlx::Error> where E : sqlx::PgExecutor <'e>,Delete every translation row for page_id whose lang is NOT in keep — the "true replace" half of a Sprint 0.47 version restore (locales present now but absent from the version are removed)
async fn delete(pool : & PgPool, page_id : Uuid, lang : & str) -> Result <bool, sqlx::Error>Delete a translation row
async fn exists_for_page(pool : & PgPool, page_id : Uuid, lang : & str,) -> Result <bool, sqlx::Error>Check whether a translation exists for (page_id, lang)

`views::jsonld`

ItemWhat it is
pub struct SchemaOrgTypeschema.org @type value
SchemaOrgType :: fn new(value : impl Into <String>) -> EngineResult <Self>Construct from a string
SchemaOrgType :: fn as_str(& self) -> & strBorrow the underlying string
SchemaOrgType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
SchemaOrgType :: fn local_business() -> Self
SchemaOrgType :: fn organization() -> Self
SchemaOrgType :: fn plumber() -> Self
SchemaOrgType :: fn dive_shop() -> Self
SchemaOrgType :: fn restaurant() -> Self
SchemaOrgType :: fn store() -> Self
SchemaOrgType :: fn article() -> Self
SchemaOrgType :: fn blog_posting() -> Self
SchemaOrgType :: fn faq_page() -> Self
SchemaOrgType :: fn breadcrumb_list() -> Self
pub struct SchemaOrgConfigConfiguration for the schema.org type emitted on a consumer's pages
SchemaOrgConfig :: fn default() -> SelfDefault to LocalBusiness — the safe primary for any brick-and-mortar consumer
fn local_business_jsonld(view : & SiteSettingsView, schema_org : & SchemaOrgConfig, site_url : & str,) -> StringJSON-LD LocalBusiness (or specialization — Plumber, Restaurant, etc.) block
fn breadcrumb_jsonld(path : & str, page_title : & str, site_url : & str) -> StringJSON-LD BreadcrumbList for a route path

`views::preview`

ItemWhat it is
pub struct PreviewDataResolved, locale-overlaid working-copy fields for one preview render
fn render_preview_html(d : & PreviewData, frame : bool) -> StringRender a draft preview

`views::public`

ItemWhat it is
pub struct GenericBusinessNapGeneric NAP (Name / Address / Phone) data shared across all consumer brands
pub struct PublicPageViewView-model for a single rendered public page
pub struct BlogPostViewView-model for a single blog post
pub struct BlogIndexViewView-model for a paginated blog index

Re-exports. Exported here, defined elsewhere.

ExportDefined in
block_wireframecms::block_wireframes::block_wireframe
widget_wireframecms::widget_wireframes::widget_wireframe
{BlockDefinition,SlotDefinition,SlotType,block,blocks}cms::block_definitions::{BlockDefinition,SlotDefinition,SlotType,block,blocks}
{BlockInstance,ComposedView}cms::block_view::{BlockInstance,ComposedView}
{CmsAttachmentState,CmsMediaState,UploadLimits}state::{CmsAttachmentState,CmsMediaState,UploadLimits}
{CmsError,CmsResult,EngineResult}error::{CmsError,CmsResult,EngineResult}
{ContactMethod,Faq,PageView,Project,RowView,Sector,ServiceCard,TeamMember,}cms::page_view::{ContactMethod,Faq,PageView,Project,RowView,Sector,ServiceCard,TeamMember,}
{PostgresPublicPageReader,PublicPageContent,PublicPageReader}services::public_reader::{PostgresPublicPageReader,PublicPageContent,PublicPageReader}
{ResolvedImage,SlotProfile}services::responsive_images::{ResolvedImage,SlotProfile}
{WidgetDefinition,widget,widgets}cms::widget_definitions::{WidgetDefinition,widget,widgets}
{WidgetInstance,slot_widgets}cms::widget_view::{WidgetInstance,slot_widgets}

Boundary

Reaches into content, infrastructure, platform.

Shares tier application with 120 other crates: application-agreements, application-ai, application-analytics, application-approvals, application-assessments, application-audit-log, application-auth, application-billing, … (120 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)application
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/application/cms
Vocabulary in force (lexicon)current

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

flowchart LR
  n_application["application"] --> n_content["content"]
  n_application["application"] --> n_infrastructure["infrastructure"]
  n_application["application"] --> n_platform["platform"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`application-audit-log`applicationnoalways
`application-auth`applicationnoalways
`application-cache`applicationnoalways
`application-core`applicationnoalways
`application-engine`applicationnoalways
`application-rbac`applicationnoalways
`content-assets`contentnoalways
`content-cms`contentnoalways
`infrastructure-ai`infrastructurenoalways
`infrastructure-jobs`infrastructurenoalways
`infrastructure-storage`infrastructurenoalways
`infrastructure-translate`infrastructurenoalways
`platform-dto`platformnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
ammonia^4.1noalways
async-trait^0.1noalways
axum^0.7multipartnoalways
base64^0.22noalways
chrono^0.4serdenoalways
hex^0.4noalways
hmac^0.12noalways
image^0.25jpeg, png, webpnoalways
kamadak-exif^0.6noalways
num_cpus^1noalways
pulldown-cmark^0.10htmlnoalways
rand^0.8noalways
serde^1derivenoalways
serde_json^1noalways
sha2^0.10noalways
similar^2noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
thiserror^2noalways
tokio^1fullnoalways
tokio-util^0.7ionoalways
tower-sessions^0.13noalways
tracing^0.1noalways
uuid^1v4, v7, serde, jsnoalways
webp^0.3noalways
zip^2noalways

Development, in this workspace.

CrateTierOptionalOnly on
`infrastructure-ai`infrastructurenoalways
`operations-e2e-contract`operationsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
dotenvy^0.15noalways
tempfile^3noalways
tokio^1full, macros, rt-multi-threadnoalways

Build. None.

Depended on by. 3 workspace crates.

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

flowchart LR
  n_application_cli["application-cli"] -->|uses| SELF
  n_application_public_ui["application-public-ui"] -->|uses| SELF
  n_operations_e2e_harness["operations-e2e-harness"] -->|uses| SELF
  SELF["application-cms"]
  SELF -->|development| n_infrastructure_ai["infrastructure-ai"]
  SELF -->|development| n_operations_e2e_contract["operations-e2e-contract"]
  SELF -->|runtime| n_application_audit_log["application-audit-log"]
  SELF -->|runtime| n_application_auth["application-auth"]
  SELF -->|runtime| n_application_cache["application-cache"]
  SELF -->|runtime| n_application_core["application-core"]
  SELF -->|runtime| n_application_engine["application-engine"]
  SELF -->|runtime| n_application_rbac["application-rbac"]
  SELF -->|runtime| n_content_assets["content-assets"]
  SELF -->|runtime| n_content_cms["content-cms"]
  SELF -->|runtime| n_infrastructure_ai["infrastructure-ai"]
  SELF -->|runtime| n_infrastructure_jobs["infrastructure-jobs"]
  SELF -->|runtime| n_infrastructure_storage["infrastructure-storage"]
  SELF -->|runtime| n_infrastructure_translate["infrastructure-translate"]
  SELF -->|runtime| n_platform_dto["platform-dto"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
postgresno
flowchart LR
  n_postgres["postgres"]

Targets

KindNameSource
libapplication_cms`src/lib.rs`
testold_resolver_unreachable`tests/old_resolver_unreachable.rs`
testpg_async_variants`tests/pg_async_variants.rs`
testpg_blob_assets`tests/pg_blob_assets.rs`
testpg_ingest_parity`tests/pg_ingest_parity.rs`
testpg_media_field_attachments`tests/pg_media_field_attachments.rs`
testpg_module_settings`tests/pg_module_settings.rs`
testpg_negative_access_matrix`tests/pg_negative_access_matrix.rs`
testpg_p4_private_original`tests/pg_p4_private_original.rs`
testpg_pages`tests/pg_pages.rs`
testpg_renditions`tests/pg_renditions.rs`
testpg_schema_mirror_guard`tests/pg_schema_mirror_guard.rs`

Error model

Error typeNamed by
AudienceErroraudience_targets, build_actor_subjects, create_grant, evaluate_asset_serving, filter_public_render_map, list_grants, … (11 total)
BackdropAdminErrorclear_assignment, get_assignment, list_assignments, set_assignment
CategoryErrorcreate, delete, get, list, update
CmsAdminErrorbuild_preview_data, create_page, execute_page_purge, get_page, list_pages, patch_translation, … (13 total)
CmsErrorCmsResult
DocsErrorrender_markdown
DownloadsErrorcreate, get, get_by_slug, list_all, list_published, soft_delete, … (7 total)
MediaAccessErrorbuild_request_viewer, resolve_attachment_serving
MediaErrorblur_floor_jpeg, daily_remaining, describe_with_provider, drain_via_provider, generate_blur_floor, ingest, … (19 total)
ModuleSettingsErrorget, set
PathErrorresolve
PostErrorcreate, delete, get, get_by_slug, list, update
RedirectErrorcreate, delete, get, list, resolve, update
SanitizeErrordeclared, no public signature returns it
ScanErrorparse_clamd_response, status_after_scan
SearchErrorsearch
TagErrorlist_tags, set_asset_tags, upsert_tag
TokenErrormint, mint_redirect, verify
TranslateAssetTextErrorrun
TranslateJobErrorrun

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimeyes
database accessyes
network I/Oyes
unsafe codenone detected
environment variablesyes

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

Configuration

VariableRead in
ALT_TEXT_MODELsrc/services/claude_cli.rs
AV_MODEsrc/services/scan.rs
CARGO_PKG_VERSIONsrc/lib.rs
CLAUDE_BINsrc/services/claude_cli.rs
DATABASE_URLsrc/jobs/translate_asset_text.rs
MUTOOL_BINsrc/services/pdf_sanitize.rs
TEST_DATABASE_URLsrc/services/backdrops.rs

3 workspace crates depend on this one: application-cli, application-public-ui, operations-e2e-harness.

Verification

KindCount
Unit tests360
Integration tests70
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root100
api202
api::attachments_admin601
api::attachments_customer601
api::audiences_admin101
api::blocks_admin101
api::categories_admin101
api::content_serve100
api::docs_admin101
api::downloads_admin101
api::downloads_public101
api::logs101
api::media1101
api::media_serve202
api::pages_admin301
api::posts_admin101
api::posts_public301
api::redirects_admin101
api::seo201
api::settings101
api::sprint4101
api::state300
api::templates_admin101
api::widgets_admin101
cms::block_definitions504
cms::block_view202
cms::block_wireframes100
cms::page_view909
cms::template_definitions406
cms::widget_definitions304
cms::widget_view202
cms::widget_wireframes100
cms::wireframes100
error300
jobs::describe_image2700
jobs::describe_image::status500
jobs::translate_asset_text502
jobs::translate_page502
jobs::variants402
media_serve_token1100
media_token603
media_urls900
middleware::referrer_log100
services::access_level700
services::attachment_audit_sink100
services::attachment_policies400
services::attachments705
services::backdrop_pool400
services::backdrops402
services::backdrops_admin700
services::blog403
services::categories8010
services::claude_cli100
services::cms300
services::cms_admin3608
services::cms_versions1400
services::docs1104
services::downloads1105
services::featured_attachment100
services::markdown303
services::media1100
services::media_access500
services::media_audience1500
services::media_field_attachment400
services::media_resolve1206
services::media_settings406
services::module_settings406
services::pdf_sanitize300
services::posts11010
services::public_reader303
services::redirects9012
services::renditions400
services::responsive_images701
services::scan700
services::search501
services::search_console400
services::seo500
services::site_settings300
services::sitemap300
services::tags500
services::translations702
views::jsonld400
views::preview200
views::public400

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc402590
Public modules with a //! block8788
pie showData
    title Public items with rustdoc
    "Documented" : 402
    "No rustdoc detected" : 188

Metrics

MetricValue
Rust source files88
Source lines26534
Code lines19663
Public API items590
Public modules88
Tests430
Examples0
Cargo features1
Direct runtime dependencies38
Workspace reverse dependencies3
pie showData
    title Public API by kind
    "constant" : 31
    "enum" : 41
    "function" : 217
    "method" : 166
    "struct" : 128
    "trait" : 3
    "type alias" : 4
pie showData
    title Rust source composition
    "Code" : 19663
    "Blank or comment" : 6871

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.

All application · Manual