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.
| Tier | application |
| Role | unclassified (baselined) |
| Path | crates/application/cms |
| Edition | 2024 |
| Targets | application_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 items | 590 across 88 modules |
| Tests | 430 |
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
apiapi::attachments_adminapi::attachments_customerapi::audiences_adminapi::blocks_adminapi::categories_adminapi::content_serveapi::docs_adminapi::downloads_adminapi::downloads_publicapi::logsapi::mediaapi::media_serveapi::pages_adminapi::posts_adminapi::posts_publicapi::redirects_adminapi::seoapi::settingsapi::sprint4api::stateapi::templates_adminapi::widgets_admincmscms::block_definitionscms::block_viewcms::block_wireframescms::page_viewcms::template_definitionscms::widget_definitionscms::widget_viewcms::widget_wireframescms::wireframeserrorjobsjobs::describe_imagejobs::describe_image::statusjobs::translate_asset_textjobs::translate_pagejobs::variantsmedia_serve_tokenmedia_tokenmedia_urlsmiddlewaremiddleware::referrer_logservicesservices::access_levelservices::attachment_audit_sinkservices::attachment_policiesservices::attachmentsservices::backdrop_poolservices::backdropsservices::backdrops_adminservices::blogservices::categoriesservices::claude_cliservices::cmsservices::cms_adminservices::cms_versionsservices::docsservices::downloadsservices::featured_attachmentservices::markdownservices::mediaservices::media_accessservices::media_audienceservices::media_field_attachmentservices::media_resolveservices::media_settingsservices::module_settingsservices::pdf_sanitizeservices::postsservices::public_readerservices::redirectsservices::renditionsservices::responsive_imagesservices::scanservices::searchservices::search_consoleservices::seoservices::site_settingsservices::sitemapservices::tagsservices::translationsviewsviews::jsonldviews::previewviews::public
_88 modules: past 25 the diagram stops being readable, so the tree above is the complete picture._
Public surface
`crate root`
| Item | What it is |
|---|---|
pub struct CmsModule | CMS 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`
| Item | What 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`
| Item | What 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`
| Item | What 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`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | The audiences admin router |
`api::blocks_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, | — |
`api::categories_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::content_serve`
| Item | What it is |
|---|---|
fn content_router(keyset : Keyset, media_root : impl Into <PathBuf>) -> Router | Build the self-contained content-origin router |
`api::docs_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, application_core::SiteConfig : FromRef <S>, | — |
`api::downloads_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::downloads_public`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::logs`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | Build the logs JSON router |
`api::media`
| Item | What 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 DescribeIn | Body for POST /media/:id/describe — which fields to (re)generate |
pub struct AltTextSuggestionIn | Body 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`
| Item | What 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`
| Item | What it is |
|---|---|
pub struct AccessSettingsInput | — |
pub struct GenerateTranslationInput | Body for POST /pages/:id/translations/:locale/generate. |
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::posts_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::posts_public`
| Item | What 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`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::seo`
| Item | What 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`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | Settings admin routes |
`api::sprint4`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>, | — |
`api::state`
| Item | What it is |
|---|---|
pub struct CmsMediaState | State for the media router (media::router) |
CmsMediaState :: fn new(media_root : impl Into <PathBuf>) -> Self | Build from a media root, constructing the LocalStorage backend |
CmsMediaState :: fn with_signing(mut self, signing : crate::media_serve_token::MediaSigning) -> Self | Attach the capability-token signing config (enables mint+302 delivery). |
pub struct CmsAttachmentState | State for the attachment routers (attachments_admin, attachments_customer) |
CmsAttachmentState :: fn new(pool : PgPool) -> Self | Engine defaults: the default policy registry + a Postgres audit sink over pool |
CmsAttachmentState :: fn attachment_service(& self, pool : PgPool) -> AttachmentService | Construct an AttachmentService wired with this state's persistent audit sink |
pub struct UploadLimits | Upload size + MIME constraints for the media/attachment routers |
UploadLimits :: fn default() -> Self | — |
`api::templates_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, | — |
`api::widgets_admin`
| Item | What it is |
|---|---|
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, | — |
`cms::block_definitions`
| Item | What it is |
|---|---|
pub enum SlotType | The type of a declared block slot (Gate 1.5 Q4) |
SlotType :: fn is_list(self) -> bool | Whether the slot holds a list of items (true) or exactly one (false) |
SlotType :: fn allowed_widget_keys(self) -> & 'static & 'static str | The widget keys this slot type accepts in the composer palette (Sprint 0.76 T7) |
pub struct SlotDefinition | A declared slot on a block |
pub struct BlockDefinition | One 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 BlockDefinition | Parsed-once block registry |
fn block(key : & str) -> Option <& 'static BlockDefinition> | The block definition for key, or None for an unknown key |
`cms::block_view`
| Item | What 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 Value | The 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 str | The block type discriminator ("" if absent or the row is not an object). |
BlockInstance<'a> :: fn id(& self) -> & 'a str | The 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 str | A 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) -> String | A scalar field rendered from Markdown to sanitized HTML |
BlockInstance<'a> :: fn url(& self, field : & str) -> & 'a str | A 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) -> ResolvedImage | A 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`
| Item | What 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`
| Item | What 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) -> & str | The template key this view renders. |
PageView<'a> :: fn fields(& self) -> & FieldDefinition | Every 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 str | A 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) -> String | A scalar field rendered from markdown to sanitized HTML via markdown_to_html (pulldown-cmark + ammonia) |
PageView<'a> :: fn url(& self, field : & str) -> & 'a str | A 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) -> ResolvedImage | A 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 ServiceCard | A "what we do" / services-listing card (home + services templates). |
pub struct Sector | A development-sector card (sectors template) |
pub struct Project | A project gallery entry (projects template) |
pub struct Faq | One FAQ entry (service template) |
pub struct ContactMethod | A contact-method row (contact template). |
pub struct TeamMember | One rendered team member (about template) |
TeamMember :: fn initial(& self) -> String | First 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 str | An 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 str | The bare value of a scalar-list row ("a","b" → "a") |
RowView<'a> :: fn markdown(& self, field : & str) -> String | A 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 str | A URL-bearing row field, scheme-sanitized via sanitize_href — the per-row analogue of PageView::url |
RowView<'a> :: fn image(& self, field : & str) -> ResolvedImage | A 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) -> & str | Scheme-sanitize a bare URL destined for an href/src |
`cms::template_definitions`
| Item | What it is |
|---|---|
pub enum FieldKind | Field kind enum understood by the Leptos PageForm |
pub struct FieldDefinition | — |
pub struct TemplateDefinition | — |
fn templates() -> & 'static TemplateDefinition | Parsed-once template registry |
`cms::widget_definitions`
| Item | What it is |
|---|---|
pub struct WidgetDefinition | One 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) -> String | The kit render partial for this widget (forge/widgets/<key>.html) |
fn widgets() -> & 'static WidgetDefinition | Parsed-once widget registry |
fn widget(key : & str) -> Option <& 'static WidgetDefinition> | The widget definition for key, or None for an unknown key |
`cms::widget_view`
| Item | What 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 str | The widget type discriminator ("" if absent or the row is not an object). |
WidgetInstance<'a> :: fn id(& self) -> & 'a str | The stable instance id ("" if absent) |
WidgetInstance<'a> :: fn image(& self, field : & str) -> ResolvedImage | A 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 str | A 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) -> String | A 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`
| Item | What 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`
| Item | What 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`
| Item | What 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`
| Item | What it is |
|---|---|
pub const PROMPT_VERSION: & str | Prompt/model contract version |
pub const ALT_MAX_CHARS: usize | Hard cap on the concise alt text (WCAG-friendly; enforced in code, not just the prompt) |
pub const MAX_OUTPUT_TOKENS: u32 | Max output tokens for the vision call (alt + short description fit easily). |
pub const DESCRIBE_TENANT: Uuid | Re-export so the host worker uses the same system tenant as the variant job. |
pub struct VisionAltText | Parsed + validated vision result |
fn accessibility_system_prompt_for_locale(locale : & str) -> String | The image-text system prompt in the operator's locale (Sprint 0.83) |
fn accessibility_system_prompt() -> String | The image-text system prompt |
fn build_ai_metadata(provider : & str, model : & str, result : & VisionAltText, source_sha256 : & str, generated_at_rfc3339 : & str,) -> serde_json::Value | Build 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) -> bool | Whether 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) -> String | Map 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 PendingAltText | A pending alt-text request the agent (or API poller) should fulfil |
pub const ALL_FIELDS: & & str | The 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 AssetTextRevision | One 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::AuditLog | Build 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`
| Item | What it is |
|---|---|
pub const NONE: & str | Never requested. |
pub const PENDING: & str | Requested, awaiting a drainer (the agent, or the key-gated API poller). |
pub const PROCESSING: & str | Claimed by the API poller (atomic, so two drainers don't collide). |
pub const COMPLETED: & str | A suggestion was written. |
pub const FAILED: & str | Generation failed (storage/AI/parse) |
`jobs::translate_asset_text`
| Item | What it is |
|---|---|
pub const JOB_TYPE: & str | infrastructure-jobs job type string the worker dispatches on. |
pub const TRANSLATE_TENANT: Uuid | Not tenant-scoped yet (mirrors variants::MEDIA_TENANT). |
pub struct TranslateAssetTextPayload | Enqueued 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`
| Item | What it is |
|---|---|
pub const JOB_TYPE: & str | infrastructure-jobs job type string the worker dispatches on. |
pub const TRANSLATE_TENANT: Uuid | Translation is not tenant-scoped yet (mirrors variants::MEDIA_TENANT). |
pub struct TranslatePagePayload | Enqueued 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`
| Item | What it is |
|---|---|
pub const JOB_TYPE: & str | Queue job_type for deferred variant generation. |
pub const MEDIA_TENANT: Uuid | System tenant for media variant jobs |
pub struct GenerateVariantsPayload | Payload 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`
| Item | What 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 ClaimsInput | The per-variant data the resolver/DB supplies to mint a token |
fn mime_for(format : & str) -> & 'static str | Map 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) -> String | Strip a filename down to a header-safe, path-free token |
fn content_disposition(disp : Disposition, filename : & str) -> String | The Content-Disposition header value for a disposition + filename |
fn build_claims(input : & ClaimsInput, cfg : & MintConfig, now : i64) -> Claims | Build 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 Keyset | A 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) -> String | The 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 MediaSigning | Owned mint config held in app state |
MediaSigning :: fn config(& self) -> MintConfig <'_> | Borrow as the pure-layer MintConfig. |
MediaSigning :: fn keyset(& self) -> Keyset | The single-key keyset that verifies tokens this config mints (kid → key). |
`media_token`
| Item | What it is |
|---|---|
pub const MIN_SIGNING_KEY_LEN: usize | Minimum signing-key length, bytes (Sprint 0.93, R-floor) |
pub enum Disposition | Content-Disposition the content origin should emit for this variant. |
pub struct Claims | The signed claim set: everything the stateless content origin needs to stream, and NO viewer identity. |
pub enum TokenError | Why 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`
| Item | What it is |
|---|---|
pub const DEFAULT_FEATURED_KIND: & str | Default variant size for hero / og featured images. |
pub const UNRESOLVED_MEDIA_URL: & str | Fail-closed placeholder for a media URL built with no gating context |
fn gated_attachment_url(attachment_id : Uuid, kind : & str) -> String | Public, 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) -> String | Public, 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) -> String | Public, 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) -> String | Staff, permission-gated URL for browsing an asset's variant: /api/v1/admin/media/assets/{asset_id}/{kind} |
pub const FEATURED_KIND_PREFERENCE: & & str | Largest-first display preference — the detail/featured slot. |
pub const THUMBNAIL_KIND_PREFERENCE: & & str | Smallest-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`
| Item | What it is |
|---|---|
async fn referrer_log_layer(State(pool) : State <PgPool>, req : Request <Body>, next : Next,) -> Response | — |
`services::access_level`
| Item | What it is |
|---|---|
pub struct Viewer | Per-request viewer context |
Viewer :: fn anonymous() -> Self | Anonymous viewer — no session. |
Viewer :: fn customer(party_id : Uuid, customer_roles : Vec <String>) -> Self | Authenticated customer with the given party + customer roles. |
Viewer :: fn staff(party_id : Uuid) -> Self | Staff viewer — bypasses checks. |
pub enum AccessDecision | Result of an access check |
pub trait EntitlementResolver | Hook for AccessLevel::Entitlement arm |
pub struct NoopEntitlementResolver | Default 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`
| Item | What it is |
|---|---|
pub struct PostgresAuditSink | Audit 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`
| Item | What it is |
|---|---|
pub struct OperatorOnlyPolicy | Operator-only policy |
OperatorOnlyPolicy :: fn cms_default() -> Self | Default 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 OwnerSelfPolicy | Owner-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 FallbackDenyPolicy | Fallback 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 PolicyRegistry | Registry of per-target_type policies |
PolicyRegistry :: fn with_defaults() -> Self | New registry with the operator-default policies pre- registered for engine-shipped entity types. |
PolicyRegistry :: fn empty() -> Self | Empty 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`
| Item | What 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`
| Item | What it is |
|---|---|
pub const BACKDROP_TAG: & str | Canonical 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`
| Item | What it is |
|---|---|
async fn is_dynamic_for_slug(pool : & PgPool, settings : & SiteSettingsView, slug : & str) -> bool | Does 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 ResolvedBackdrop | Resolved backdrop for one page render |
async fn resolve(pool : & PgPool, settings : & SiteSettingsView, slug : & str, legacy_fallback : & str,) -> ResolvedBackdrop | Resolve 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`
| Item | What 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`
| Item | What it is |
|---|---|
pub struct PageCursor | A 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 PageInfo | Cursor pagination metadata |
pub struct BlogQuery | Filter + cursor + limit for blog queries |
`services::categories`
| Item | What 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`
| Item | What it is |
|---|---|
pub struct ClaudeCliProvider | Vision provider backed by the local claude CLI (subscription auth). |
ClaudeCliProvider :: fn from_env() -> Self | Resolve 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`
| Item | What it is |
|---|---|
pub struct PostgresCmsBackend | — |
pub struct BlogCategoryRow | — |
PostgresCmsBackend :: fn new(pool : PgPool) -> Self | — |
PostgresCmsBackend :: fn pool(& self) -> & PgPool | Borrow 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`
| Item | What it is |
|---|---|
pub enum CmsAdminError | — |
pub enum TemplateKey | Page template key — maps 1:1 to the Postgres ENUM cms_template_key added in migration 073 |
TemplateKey :: fn json_key(& self) -> & 'static str | The 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 PatchTranslationInput | Partial update body for patch_translation (Sprint 0.36 split-save) |
pub struct ListFilter | — |
pub enum ParentFilter | parent_id level filter (Gate 1.5 R4) |
pub enum ListMode | Which shape the Pages list returns |
pub struct TreeMeta | Tree-mode metadata (Gate 1.5 R4) |
pub struct PageList | Result of list_pages |
pub const DEFAULT_TREE_CAP: i64 | Default 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) -> String | Derive a URL-friendly slug from an arbitrary title |
fn html_to_markdown(html : & str) -> String | Minimal HTML→markdown for the editor body fallback (Sprint 3 US-3.1) |
fn markdown_to_html(src : & str) -> String | Render 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 PurgeStrategy | Purge strategy when a page has children (Gate 1.5: the operator MUST choose explicitly — the two paths have opposite intent). |
pub struct PagePurgePlan | What a single-page purge would do, computed against the live table |
pub struct TrashOutcome | Outcome 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 TrashPlan | Result of planning an "empty trash" purge (forge pages purge --trashed, Sprint 0.35 T-0.35.5) |
`services::cms_versions`
| Item | What 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 DiffRow | One 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) -> String | Canonical 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) -> String | Serialize the diff-relevant fields of a snapshot to deterministic text for build_side_by_side_diff |
pub struct VersionDiff | A 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 RestoreDraftCols | The 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) -> RestoreDraftCols | Pure projection of a snapshot onto the restore-draft column set |
pub enum RestoreOutcome | Outcome 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`
| Item | What it is |
|---|---|
pub struct DocsConfig | Consumer-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,) -> bool | Whether 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 str | Best-effort MIME for an attachment served from disk |
`services::downloads`
| Item | What 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`
| Item | What 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`
| Item | What it is |
|---|---|
fn render(markdown : & str) -> String | Render markdown to sanitized HTML |
fn render_unsanitized(markdown : & str) -> String | Render markdown to HTML WITHOUT sanitization |
fn sanitize_html(input : & str) -> String | Run untrusted HTML through ammonia with the engine's default allowlist |
`services::media`
| Item | What it is |
|---|---|
pub const MAX_DIMENSION: u32 | Per-dimension cap — owned by the library crate (re-exported for the API layer). |
pub const MAX_SIZE_BYTES: usize | Upload 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: & & str | Every display variant kind, in library crate SIZES order |
pub struct MediaSettings | Media-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) -> bool | True when variant generation is deferred to a background job. |
MediaSettings :: fn immediate_kinds(& self) -> & 'static & 'static str | Variant 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 UploadResult | Final 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`
| Item | What it is |
|---|---|
pub struct ServeTarget | The variant the resolver chose to stream. |
pub enum ServeOutcome | The outcome of resolving a gated request. |
pub enum MediaAccessError | Resolution 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`
| Item | What it is |
|---|---|
pub enum AudienceError | Resolution 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 PublicServeTarget | A resolved public-attachment serve target (the byte coordinates to mint a token for) |
pub enum PublicServeOutcome | The 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 AudienceTarget | A 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`
| Item | What it is |
|---|---|
pub const MEDIA_FIELD_NAME: & str | The 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`
| Item | What it is |
|---|---|
pub const ASSET_REF_PREFIX: & str | The asset:// sentinel prefix that marks a typed asset reference. |
pub enum MediaRef | A parsed metadata field value. |
pub enum ResolvedMedia | The 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) -> MediaRef | Discriminate 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) -> ResolvedMedia | Resolve 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`
| Item | What it is |
|---|---|
pub struct MediaVariantSettings | Typed view of the single media_settings row |
MediaVariantSettings :: fn default() -> Self | — |
MediaVariantSettings :: fn is_async(& self) -> bool | True when variant generation is deferred to the background worker. |
MediaVariantSettings :: fn immediate_kinds(& self) -> & 'static & 'static str | The 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) -> MediaVariantSettings | Read 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`
| Item | What it is |
|---|---|
pub enum ModuleSettingsError | Errors 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) -> T | Reads 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`
| Item | What it is |
|---|---|
pub const SANITIZE_MAX_BYTES: usize | Hard cap on PDF bytes accepted for sanitization (matches the blob upload cap). |
pub struct PdfSanitizer | A PDF sanitizer backed by an external tool (default: mutool). |
pub enum SanitizeError | A sanitization failure |
PdfSanitizer :: fn default() -> Self | — |
PdfSanitizer :: fn from_env() -> Self | Resolve from env: MUTOOL_BIN (default /usr/bin/mutool), 30s timeout. |
PdfSanitizer :: fn binary(& self) -> & str | The configured binary's path. |
PdfSanitizer :: fn available(& self) -> bool | Is 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`
| Item | What it is |
|---|---|
pub enum PostError | — |
pub struct Post | Engine-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`
| Item | What it is |
|---|---|
pub struct PublicPageContent | The slice of a published CMS page the public site renders |
pub trait PublicPageReader | Published-only CMS read facade |
pub struct PostgresPublicPageReader | Postgres-backed PublicPageReader |
PostgresPublicPageReader :: fn new(pool : PgPool) -> Self | — |
PostgresPublicPageReader :: async fn get_page_by_slug(& self, lang : & str, slug : & str) -> Option <PublicPageContent> | — |
`services::redirects`
| Item | What 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`
| Item | What it is |
|---|---|
pub const FLOOR_MAX_PX: u32 | Default 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`
| Item | What it is |
|---|---|
pub enum SlotProfile | A render slot |
pub struct PictureMarkup | The result of a <picture> render |
fn render_picture(asset_id : Uuid, profile : SlotProfile, available : & VariantInfo, alt : & str,) -> PictureMarkup | Pure <picture> markup builder (no DB) |
async fn variant_kind_exists(pool : & PgPool, asset_id : Uuid, kind : & str) -> bool | True 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,) -> PictureMarkup | Async convenience: load the asset's public variants (variants_read::get_variants) then call render_picture |
SlotProfile :: fn from_slot_name(name : Option <& str>) -> SlotProfile | Map a registry slot_profile annotation to a profile |
pub struct ResolvedImage | The render-contract type for ONE resolved image (Sprint 0.98 Gate-1.5 Q1/Q2) |
ResolvedImage :: fn has_picture(& self) -> bool | True when a responsive <picture> is available (the preferred render). |
ResolvedImage :: fn has_image(& self) -> bool | True 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,) -> ResolvedImage | Pure builder: package a slot's <picture> (from render_picture) plus the single fallback url + alt into a ResolvedImage |
`services::scan`
| Item | What it is |
|---|---|
pub enum AvMode | AV operating mode (Gate 1.5: explicit, never a silent fail-open). |
AvMode :: fn from_env() -> Self | Resolve the mode from AV_MODE (required → AvMode::Required; anything else / unset → AvMode::DisabledTrusted, the safe-for-dev default). |
AvMode :: fn ingest_status(self) -> & 'static str | The 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 ScanVerdict | A scanner's verdict on a stream of bytes. |
pub enum ScanError | A scan failure (NOT a clean/infected verdict) |
fn status_after_scan(result : & Result <ScanVerdict, ScanError>) -> & 'static str | The 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) -> bool | Whether an asset's scan_status permits serving its bytes |
pub struct ClamdScanner | A 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`
| Item | What it is |
|---|---|
pub enum SearchError | — |
pub enum SearchHit | — |
pub struct FacetCount | Per-entity facet count. |
pub struct SearchResponse | Universal 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`
| Item | What it is |
|---|---|
pub struct SearchConsoleQuery | Query parameters for a Search Console facts retrieval |
pub struct SearchConsoleFact | One row of Search Console facts |
pub trait SearchConsoleProvider | The trait the engine consumes when a consumer wires up GSC integration |
pub struct NullSearchConsoleProvider | No-op provider for consumers that haven't wired up GSC |
NullSearchConsoleProvider :: async fn fetch_facts(& self, _query : SearchConsoleQuery,) -> EngineResult <Vec <SearchConsoleFact>> | — |
`services::seo`
| Item | What 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>) -> bool | True 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 DraftState | Draft 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,) -> DraftState | Compute 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) -> u32 | Infer a published-snapshot's schema version (Round A #2) |
`services::site_settings`
| Item | What it is |
|---|---|
pub struct SiteSettingsView | Cached view of the site_settings singleton |
SiteSettingsView :: fn phone_display(& self) -> String | E.164 → human display, e.g |
fn invalidate_cache() | Drop the cached view |
async fn site_settings(pool : & PgPool) -> SiteSettingsView | Read the singleton site_settings row, with 60s in-process cache |
`services::sitemap`
| Item | What 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 <'_>,) -> String | Build 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) -> String | robots.txt body |
`services::tags`
| Item | What 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`
| Item | What it is |
|---|---|
pub struct TranslationRow | One translation row |
TranslationRow :: fn to_locale_snapshot(& self) -> content_cms::LocaleSnapshot | Project 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`
| Item | What it is |
|---|---|
pub struct SchemaOrgType | schema.org @type value |
SchemaOrgType :: fn new(value : impl Into <String>) -> EngineResult <Self> | Construct from a string |
SchemaOrgType :: fn as_str(& self) -> & str | Borrow 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 SchemaOrgConfig | Configuration for the schema.org type emitted on a consumer's pages |
SchemaOrgConfig :: fn default() -> Self | Default to LocalBusiness — the safe primary for any brick-and-mortar consumer |
fn local_business_jsonld(view : & SiteSettingsView, schema_org : & SchemaOrgConfig, site_url : & str,) -> String | JSON-LD LocalBusiness (or specialization — Plumber, Restaurant, etc.) block |
fn breadcrumb_jsonld(path : & str, page_title : & str, site_url : & str) -> String | JSON-LD BreadcrumbList for a route path |
`views::preview`
| Item | What it is |
|---|---|
pub struct PreviewData | Resolved, locale-overlaid working-copy fields for one preview render |
fn render_preview_html(d : & PreviewData, frame : bool) -> String | Render a draft preview |
`views::public`
| Item | What it is |
|---|---|
pub struct GenericBusinessNap | Generic NAP (Name / Address / Phone) data shared across all consumer brands |
pub struct PublicPageView | View-model for a single rendered public page |
pub struct BlogPostView | View-model for a single blog post |
pub struct BlogIndexView | View-model for a paginated blog index |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
block_wireframe | cms::block_wireframes::block_wireframe |
widget_wireframe | cms::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) |
| Location | crates/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.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `application-audit-log` | application | no | always |
| `application-auth` | application | no | always |
| `application-cache` | application | no | always |
| `application-core` | application | no | always |
| `application-engine` | application | no | always |
| `application-rbac` | application | no | always |
| `content-assets` | content | no | always |
| `content-cms` | content | no | always |
| `infrastructure-ai` | infrastructure | no | always |
| `infrastructure-jobs` | infrastructure | no | always |
| `infrastructure-storage` | infrastructure | no | always |
| `infrastructure-translate` | infrastructure | no | always |
| `platform-dto` | platform | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
ammonia | ^4.1 | — | no | always |
async-trait | ^0.1 | — | no | always |
axum | ^0.7 | multipart | no | always |
base64 | ^0.22 | — | no | always |
chrono | ^0.4 | serde | no | always |
hex | ^0.4 | — | no | always |
hmac | ^0.12 | — | no | always |
image | ^0.25 | jpeg, png, webp | no | always |
kamadak-exif | ^0.6 | — | no | always |
num_cpus | ^1 | — | no | always |
pulldown-cmark | ^0.10 | html | no | always |
rand | ^0.8 | — | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
sha2 | ^0.10 | — | no | always |
similar | ^2 | — | no | always |
sqlx | ^0.8 | runtime-tokio, postgres, chrono, uuid, json | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full | no | always |
tokio-util | ^0.7 | io | no | always |
tower-sessions | ^0.13 | — | no | always |
tracing | ^0.1 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
webp | ^0.3 | — | no | always |
zip | ^2 | — | no | always |
Development, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `infrastructure-ai` | infrastructure | no | always |
| `operations-e2e-contract` | operations | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
dotenvy | ^0.15 | — | no | always |
tempfile | ^3 | — | no | always |
tokio | ^1 | full, macros, rt-multi-thread | no | always |
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
| Feature | Enables | On by default |
|---|---|---|
postgres | — | no |
flowchart LR n_postgres["postgres"]
Targets
| Kind | Name | Source |
|---|---|---|
| lib | application_cms | `src/lib.rs` |
| test | old_resolver_unreachable | `tests/old_resolver_unreachable.rs` |
| test | pg_async_variants | `tests/pg_async_variants.rs` |
| test | pg_blob_assets | `tests/pg_blob_assets.rs` |
| test | pg_ingest_parity | `tests/pg_ingest_parity.rs` |
| test | pg_media_field_attachments | `tests/pg_media_field_attachments.rs` |
| test | pg_module_settings | `tests/pg_module_settings.rs` |
| test | pg_negative_access_matrix | `tests/pg_negative_access_matrix.rs` |
| test | pg_p4_private_original | `tests/pg_p4_private_original.rs` |
| test | pg_pages | `tests/pg_pages.rs` |
| test | pg_renditions | `tests/pg_renditions.rs` |
| test | pg_schema_mirror_guard | `tests/pg_schema_mirror_guard.rs` |
Error model
| Error type | Named by |
|---|---|
AudienceError | audience_targets, build_actor_subjects, create_grant, evaluate_asset_serving, filter_public_render_map, list_grants, … (11 total) |
BackdropAdminError | clear_assignment, get_assignment, list_assignments, set_assignment |
CategoryError | create, delete, get, list, update |
CmsAdminError | build_preview_data, create_page, execute_page_purge, get_page, list_pages, patch_translation, … (13 total) |
CmsError | CmsResult |
DocsError | render_markdown |
DownloadsError | create, get, get_by_slug, list_all, list_published, soft_delete, … (7 total) |
MediaAccessError | build_request_viewer, resolve_attachment_serving |
MediaError | blur_floor_jpeg, daily_remaining, describe_with_provider, drain_via_provider, generate_blur_floor, ingest, … (19 total) |
ModuleSettingsError | get, set |
PathError | resolve |
PostError | create, delete, get, get_by_slug, list, update |
RedirectError | create, delete, get, list, resolve, update |
SanitizeError | declared, no public signature returns it |
ScanError | parse_clamd_response, status_after_scan |
SearchError | search |
TagError | list_tags, set_asset_tags, upsert_tag |
TokenError | mint, mint_redirect, verify |
TranslateAssetTextError | run |
TranslateJobError | run |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | yes |
| database access | yes |
| network I/O | yes |
| unsafe code | none detected |
| environment variables | yes |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
| Variable | Read in |
|---|---|
ALT_TEXT_MODEL | src/services/claude_cli.rs |
AV_MODE | src/services/scan.rs |
CARGO_PKG_VERSION | src/lib.rs |
CLAUDE_BIN | src/services/claude_cli.rs |
DATABASE_URL | src/jobs/translate_asset_text.rs |
MUTOOL_BIN | src/services/pdf_sanitize.rs |
TEST_DATABASE_URL | src/services/backdrops.rs |
Related capabilities
3 workspace crates depend on this one: application-cli, application-public-ui, operations-e2e-harness.
Verification
| Kind | Count |
|---|---|
| Unit tests | 360 |
| Integration tests | 70 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 1 | 0 | 0 |
api | 2 | 0 | 2 |
api::attachments_admin | 6 | 0 | 1 |
api::attachments_customer | 6 | 0 | 1 |
api::audiences_admin | 1 | 0 | 1 |
api::blocks_admin | 1 | 0 | 1 |
api::categories_admin | 1 | 0 | 1 |
api::content_serve | 1 | 0 | 0 |
api::docs_admin | 1 | 0 | 1 |
api::downloads_admin | 1 | 0 | 1 |
api::downloads_public | 1 | 0 | 1 |
api::logs | 1 | 0 | 1 |
api::media | 11 | 0 | 1 |
api::media_serve | 2 | 0 | 2 |
api::pages_admin | 3 | 0 | 1 |
api::posts_admin | 1 | 0 | 1 |
api::posts_public | 3 | 0 | 1 |
api::redirects_admin | 1 | 0 | 1 |
api::seo | 2 | 0 | 1 |
api::settings | 1 | 0 | 1 |
api::sprint4 | 1 | 0 | 1 |
api::state | 3 | 0 | 0 |
api::templates_admin | 1 | 0 | 1 |
api::widgets_admin | 1 | 0 | 1 |
cms::block_definitions | 5 | 0 | 4 |
cms::block_view | 2 | 0 | 2 |
cms::block_wireframes | 1 | 0 | 0 |
cms::page_view | 9 | 0 | 9 |
cms::template_definitions | 4 | 0 | 6 |
cms::widget_definitions | 3 | 0 | 4 |
cms::widget_view | 2 | 0 | 2 |
cms::widget_wireframes | 1 | 0 | 0 |
cms::wireframes | 1 | 0 | 0 |
error | 3 | 0 | 0 |
jobs::describe_image | 27 | 0 | 0 |
jobs::describe_image::status | 5 | 0 | 0 |
jobs::translate_asset_text | 5 | 0 | 2 |
jobs::translate_page | 5 | 0 | 2 |
jobs::variants | 4 | 0 | 2 |
media_serve_token | 11 | 0 | 0 |
media_token | 6 | 0 | 3 |
media_urls | 9 | 0 | 0 |
middleware::referrer_log | 1 | 0 | 0 |
services::access_level | 7 | 0 | 0 |
services::attachment_audit_sink | 1 | 0 | 0 |
services::attachment_policies | 4 | 0 | 0 |
services::attachments | 7 | 0 | 5 |
services::backdrop_pool | 4 | 0 | 0 |
services::backdrops | 4 | 0 | 2 |
services::backdrops_admin | 7 | 0 | 0 |
services::blog | 4 | 0 | 3 |
services::categories | 8 | 0 | 10 |
services::claude_cli | 1 | 0 | 0 |
services::cms | 3 | 0 | 0 |
services::cms_admin | 36 | 0 | 8 |
services::cms_versions | 14 | 0 | 0 |
services::docs | 11 | 0 | 4 |
services::downloads | 11 | 0 | 5 |
services::featured_attachment | 1 | 0 | 0 |
services::markdown | 3 | 0 | 3 |
services::media | 11 | 0 | 0 |
services::media_access | 5 | 0 | 0 |
services::media_audience | 15 | 0 | 0 |
services::media_field_attachment | 4 | 0 | 0 |
services::media_resolve | 12 | 0 | 6 |
services::media_settings | 4 | 0 | 6 |
services::module_settings | 4 | 0 | 6 |
services::pdf_sanitize | 3 | 0 | 0 |
services::posts | 11 | 0 | 10 |
services::public_reader | 3 | 0 | 3 |
services::redirects | 9 | 0 | 12 |
services::renditions | 4 | 0 | 0 |
services::responsive_images | 7 | 0 | 1 |
services::scan | 7 | 0 | 0 |
services::search | 5 | 0 | 1 |
services::search_console | 4 | 0 | 0 |
services::seo | 5 | 0 | 0 |
services::site_settings | 3 | 0 | 0 |
services::sitemap | 3 | 0 | 0 |
services::tags | 5 | 0 | 0 |
services::translations | 7 | 0 | 2 |
views::jsonld | 4 | 0 | 0 |
views::preview | 2 | 0 | 0 |
views::public | 4 | 0 | 0 |
What the tests establish, by name:
serve_attachment_does_not_call_the_old_0_59_resolver—tests/old_resolver_unreachable.rsserve_attachment_routes_through_the_new_evaluator—tests/old_resolver_unreachable.rsasync_ingest_defers_then_job_completes_variants—tests/pg_async_variants.rsmedia_settings_immediate_kinds_dispatch—tests/pg_async_variants.rsmedia_settings_persists_and_in_request_set_is_thumb_medium_jpeg_webp—tests/pg_async_variants.rsblob_ingest_stores_servable_file_variant_and_dedups—tests/pg_blob_assets.rswrapper_and_primitive_match_variant_set_and_visibility—tests/pg_ingest_parity.rswrapper_and_primitive_share_dedup_hash—tests/pg_ingest_parity.rssync_reconciles_bucket_by_asset_id_and_resolver_emits_gated_url—tests/pg_media_field_attachments.rsset_get_roundtrip_upsert_and_default—tests/pg_module_settings.rsadmin_route_denies_gated_asset_without_grant—tests/pg_negative_access_matrix.rsadmin_route_expired_and_revoked_grants_deny—tests/pg_negative_access_matrix.rscustomer_group_grant_can_never_be_inserted_or_satisfy—tests/pg_negative_access_matrix.rspublic_asset_route_denies_every_gated_and_dirty_state—tests/pg_negative_access_matrix.rspublic_asset_route_format_suffix_404s_when_that_format_missing—tests/pg_negative_access_matrix.rspublic_asset_route_format_suffix_pins_the_container—tests/pg_negative_access_matrix.rspublic_asset_route_missing_asset_is_not_found—tests/pg_negative_access_matrix.rspublic_asset_route_never_serves_original—tests/pg_negative_access_matrix.rspublic_asset_route_serves_display_kinds_for_public_asset—tests/pg_negative_access_matrix.rspublic_asset_route_serves_portrait_9x16—tests/pg_negative_access_matrix.rspublic_asset_route_serves_square_crops—tests/pg_negative_access_matrix.rspublic_asset_route_unknown_format_suffix_404s—tests/pg_negative_access_matrix.rspublic_route_attachment_spoof_and_deleted_gates—tests/pg_negative_access_matrix.rspublic_route_denies_every_gated_and_dirty_state—tests/pg_negative_access_matrix.rspublic_route_never_serves_original_even_for_public_asset—tests/pg_negative_access_matrix.rspublic_route_positive_control_serves_display_kinds—tests/pg_negative_access_matrix.rsrender_emit_drops_gated_and_keeps_public—tests/pg_negative_access_matrix.rsrender_emit_drops_public_asset_with_no_display_variant—tests/pg_negative_access_matrix.rsresolve_picture_grid_emits_gated_square_urls_and_serves—tests/pg_negative_access_matrix.rsresolve_picture_private_asset_emits_nothing—tests/pg_negative_access_matrix.rs- _… 400 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 402 | 590 |
Public modules with a //! block | 87 | 88 |
pie showData
title Public items with rustdoc
"Documented" : 402
"No rustdoc detected" : 188
Metrics
| Metric | Value |
|---|---|
| Rust source files | 88 |
| Source lines | 26534 |
| Code lines | 19663 |
| Public API items | 590 |
| Public modules | 88 |
| Tests | 430 |
| Examples | 0 |
| Cargo features | 1 |
| Direct runtime dependencies | 38 |
| Workspace reverse dependencies | 3 |
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.