pub trait UiCtx {
// Required methods
fn mount(&self) -> &MountPrefix;
fn htmx(&self) -> &HtmxInfo;
fn session(&self) -> Option<&SessionCtx>;
// Provided methods
fn csrf_token(&self) -> Option<&str> { ... }
fn path(&self, rel: &str) -> String { ... }
fn url(&self, route: AppRoute<'_>) -> String { ... }
}Expand description
Shared read-only UI rendering context implemented by RequestCtx and legacy [crate::web_ui::RepoContext].
Required Methods§
fn mount(&self) -> &MountPrefix
fn htmx(&self) -> &HtmxInfo
fn session(&self) -> Option<&SessionCtx>
Provided Methods§
fn csrf_token(&self) -> Option<&str>
fn path(&self, rel: &str) -> String
fn url(&self, route: AppRoute<'_>) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".