pub struct Ui { /* private fields */ }Expand description
Renderer configuration; mounted with HarnessBuilder::ui.
Implementations§
Source§impl Ui
impl Ui
pub fn new() -> Self
Sourcepub fn theme_css(self, url: impl Into<String>) -> Self
pub fn theme_css(self, url: impl Into<String>) -> Self
A stylesheet linked after cf.css on every page: the venture’s
theme. Absolute URL or a path on the API origin. The spec’s
theme.css_url wins when both are set.
Sourcepub fn from_spec(json: &str) -> Result<Self, String>
pub fn from_spec(json: &str) -> Result<Self, String>
The venture’s UiSpec as JSON (include_str!("../ui.json")).
Parsed here; validated against the surface by Harness::build.
A runtime UI_SPEC in config replaces it without a rebuild.
§Errors
The parse error, with its path.
pub fn spec(self, spec: UiSpec) -> Self
Trait Implementations§
Source§impl UiMount for Ui
impl UiMount for Ui
Source§fn validate(&self, surface: &SurfaceDocument, errors: &mut ConfigError)
fn validate(&self, surface: &SurfaceDocument, errors: &mut ConfigError)
Build-time check of whatever the renderer was configured with (a
UiSpec) against the composed surface; problems go into the same
list as every other build error.Auto Trait Implementations§
impl Freeze for Ui
impl RefUnwindSafe for Ui
impl Send for Ui
impl Sync for Ui
impl Unpin for Ui
impl UnsafeUnpin for Ui
impl UnwindSafe for Ui
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
Mutably borrows from an owned value. Read more