pub struct UiContext {
pub surface: Arc<dyn SurfaceSource>,
pub api: Router,
pub config: Arc<dyn Config>,
pub venture: Arc<Venture>,
pub captcha_configured: bool,
pub signer: Option<Arc<dyn Signer>>,
pub rate_limiter: Option<Arc<dyn RateLimiter>>,
}Expand description
What a UI renderer gets from the harness (ADR 0010). Built by
Harness::router for every router it assembles.
Fields§
§surface: Arc<dyn SurfaceSource>The composed surface, admin actions included; the renderer applies
its own audience rules per page. Sidecar modules arrive through
SurfaceSource::current.
api: RouterThe /v1 API router, for in-process dispatch: a form post becomes
the JSON request the module accepts and is sent through this
service, so every module layer runs and nothing leaves the process.
The request must carry the caller’s crate::Scope in its
extensions, because the scope layer sits above /v1.
config: Arc<dyn Config>§venture: Arc<Venture>§captcha_configured: boolWhether the Captcha port is configured, so the renderer knows to
include the widget on actions that declare captcha.
signer: Option<Arc<dyn Signer>>The Signer, for the admin session cookie (issue #74). Absent
means no admin UI, the way an unset ADMIN_TOKEN does.
rate_limiter: Option<Arc<dyn RateLimiter>>The RateLimiter, for the admin login form.