Skip to main content

Crate proa_framework_axum

Crate proa_framework_axum 

Source

Re-exports§

pub use csp::CspNonceLayer;
pub use csp::CspPolicy;
pub use csrf::CrossOriginProtectionLayer;
pub use dev_reload::DevReloadLayer;
pub use dev_reload::RELOAD_PORT_ENV;
pub use dev_reload::RELOAD_TOKEN_ENV;
pub use discovery::robots_txt;
pub use discovery::sitemap_index_xml;
pub use discovery::sitemap_xml;
pub use public_assets::AssetPrefix;
pub use public_assets::InvalidAssetPrefix;
pub use public_assets::PublicAssetError;
pub use public_assets::PublicAssets;
pub use public_assets::ASSET_PREFIX_ENV;
pub use readiness::Readiness;
pub use readiness::DEFAULT_READINESS_TIMEOUT;
pub use route::app_url;
pub use route::explicit_markdown;
pub use route::explicit_markdown_async_with_loader;
pub use route::negotiate;
pub use route::negotiate_async_with_loader;
pub use route::render_metadata_head;
pub use route::resolved_metadata;
pub use route::router_from_spec;
pub use route::Layout;
pub use route::LayoutRef;
pub use route::LocalStreamExecutorConfig;
pub use route::ManagedPreparationTimeout;
pub use route::MarkdownAlternate;
pub use route::PageCacheLayer;
pub use route::PageCacheService;
pub use route::RepresentationResponse;
pub use route::Route;
pub use route::RouteContextLayer;
pub use route::RouteResponse;
pub use route::RouteResponseFuture;
pub use rsjs_assets::RsjsAssets;
pub use rsjs_assets::RsjsAssetsError;
pub use rsjs_assets::RsjsFile;
pub use security_headers::FrameOptions;
pub use security_headers::SecurityHeadersConfig;
pub use security_headers::SecurityHeadersLayer;
pub use server::serve;
pub use server::serve_with_shutdown;
pub use server::ShutdownOutcome;
pub use server::DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT;
pub use static_service::EmbeddedStaticService;
pub use route::PageCache;

Modules§

csp
Per-request CSP nonce generation and a strict Content-Security-Policy.
csrf
Cross-origin request protection (CSRF defense).
dev_reload
Development-only browser live reload.
discovery
Axum responses for sitemap.xml and robots.txt.
public_assets
Startup resolution and serving for the build tool’s public-file catalog.
readiness
Dependency-aware readiness probes for Axum applications.
route
Routing module for the Proa framework
rsjs_assets
The linked RSJS modules, published under content-hashed names.
security_headers
Default security response headers applied by the framework builder.
server
Signal-aware Axum serving with a bounded graceful-shutdown window.
static_service

Structs§

AppUrl
A URL composed without allocating an intermediate string.
ArticleMetadata
Article-specific Open Graph properties. Author values are profile URLs. Setting this object replaces its inherited article fields as one unit.
BasePath
The browser-visible mount path of an application behind a prefix-stripping proxy.
CascadeOpenGraph
Cascade specification for Open Graph metadata.
ComponentRole
Component intent declared on the render trait and visible to generic dispatch.
ComputedRouteMeta
Precomputed metadata for a specific route (flattened at build time).
CspNonce
A validated Content Security Policy nonce for one rendered request.
DevServerStartup
Report a custom server’s browser URL to the proa dev process that launched it. Call from_env before binding, then ready once the routers and listeners are ready. Outside the dev supervisor both operations are inert.
FrameworkBuilder
Builder for the framework’s axum Router.
HeadAlternate
An alternate language, feed, or media-specific representation of a page.
HeadAuthor
HeadConfig
Application configuration shared by every request that enables managed head rendering.
HeadDefaults
Reusable immutable defaults. Strings and resource keys share storage across requests.
HeadIcon
HeadMedia
A structured media replacement. Related properties always travel together.
HeadMetadata
An atomic metadata patch for a layout or Page’s head hook.
HeadUrlPolicy
Trusted application configuration, never inferred from request headers.
HeadVerification
A named site-verification tag. Repeated names may carry multiple tokens.
InvalidBasePath
OpenGraph
Static Open Graph descriptor returned by metadata providers.
OpenGraphImage
Static Open Graph image descriptor.
OpenGraphMedia
Static Open Graph media descriptor (audio/video).
ResolvedMetadata
Resolved metadata from a stack of metadata providers.
ResolvedOpenGraphImage
ResolvedOpenGraphMedia
Robots
Directives for one HTML page, separate from the site’s RobotsTxt. An omitted directive emits nothing. A Page’s Robots replaces its ancestor’s whole policy; Google-specific directives use HeadMetadata::googlebot.
RobotsGroup
One User-agent group in robots.txt. See RFC 9309 §2.1.
RobotsTxt
A robots.txt document.
RouteSpec
Portable route tree description with no server/router dependency.
Sitemap
A sitemap.xml document. Element order follows the official schema.
SitemapFile
One named document served at /sitemap-{id}.xml by with_sitemaps.
SitemapIndex
An XML sitemap index linking to multiple same-origin sitemap documents.
SitemapIndexEntry
A reference to a sitemap document, rather than a page URL. See Sitemaps: index loc.
SitemapPriority
Sitemap priority in tenths from 0.0 through 1.0. Tenths are Proa’s subset of the priority range.
SitemapUrl
One URL in a sitemap. See Sitemaps: loc. Supply URL-encoded paths; XML escaping is applied separately when rendering. Fragments and raw characters excluded from URI/IRI syntax are rejected. Local paths must not traverse above the application root. Absolute URLs retain their spelling; their parsed path determines directory scope.
Twitter
A Twitter/X card patch. Unset title/description/images fall back to the final Open Graph/document values. Explicit clears suppress their fallback.

Enums§

CascadeValue
Represents how a metadata field should cascade from parent to child.
ChangeFreq
How often a sitemap URL is expected to change. Values are crawler hints: Sitemaps: changefreq.
DiscoveryError
Failure while building a sitemap or robots.txt document.
DynRenderOutcome
Boxed-future analogue of RenderOutcome used at the dyn-erasure boundary in DynWebRender.
DynSendRenderOutcome
Boxed-future outcome at a send-capable dyn-erasure boundary.
FrameworkBuildError
Errors that prevent the framework router from starting.
HeadTitle
A normal title uses the ancestor template; an absolute title bypasses it.
HeadValue
A metadata patch: omission inherits, Set replaces, and Clear removes.
IconKind
ImagePreview
ReferrerPolicy
RobotsRule
An Allow or Disallow rule. Crawlers resolve precedence: RFC 9309 §2.2.2.
RouteMode
Routing mode for a route.
TwitterCard

Constants§

DEFAULT_BODY_LIMIT_BYTES
Default request body size limit applied by FrameworkBuilder::build.
DEFAULT_REQUEST_TIMEOUT
Default request timeout applied by FrameworkBuilder::build.
MAX_ROBOTS_BYTES
Google’s robots.txt processing limit, not an RFC maximum document size. See Google: file format and RFC 9309 §2.5.
MAX_SITEMAP_BYTES
Maximum uncompressed UTF-8 document size permitted by the sitemap protocol. See Sitemaps: index limits.
MAX_SITEMAP_ENTRIES
Maximum number of URLs in a sitemap, or sitemaps in an index. See Sitemaps: index limits.

Traits§

DynWebRender
Dyn-compatible erasure adapter for WebRender.
DynWebRenderSend
Dyn-compatible erasure for WebRenderSend.
Metadata
Trait for defining page metadata (title, description, Open Graph, etc.).
SyncHeadOperation
Synchronous layout and Page hooks mutate the context directly and return a result; they cannot hide an await. Keep impl SyncHeadOperation in the signature to preserve the absence marker without refining the trait’s return type.

Functions§

absolute_http_url
Join a public origin, runtime base path, and application path into an absolute http or https URL. The result must fit the sitemap location bounds; see SitemapUrl. Absolute input passes through, including other origins. Sitemap documents separately enforce origin and directory scope; robots sitemap links may be external.
base_path_assets
Compose root-relative CSS URLs and native JavaScript URL operations in a static router. FrameworkBuilder applies this to with_static_service when a base path is configured. Custom routers/scaffolds can install it directly. Page HTML bodies remain untouched and streaming. Parsed asset results are cached by content with a bounded memory budget.
drive_dyn_render
Drive a DynWebRender outcome to completion. Sync results return immediately; pending futures are awaited.
drive_dyn_send_render
standalone_static_router

Type Aliases§

MetadataRef
StaticPathsFn
Function type for generating static paths at build time.