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.
Auto Trait Implementations§
impl !RefUnwindSafe for UiContext
impl !UnwindSafe for UiContext
impl Freeze for UiContext
impl Send for UiContext
impl Sync for UiContext
impl Unpin for UiContext
impl UnsafeUnpin for UiContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more