Skip to main content

UiCtx

Trait UiCtx 

Source
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§

Source

fn mount(&self) -> &MountPrefix

Source

fn htmx(&self) -> &HtmxInfo

Source

fn session(&self) -> Option<&SessionCtx>

Provided Methods§

Source

fn csrf_token(&self) -> Option<&str>

Source

fn path(&self, rel: &str) -> String

Source

fn url(&self, route: AppRoute<'_>) -> String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§