pub struct Design {
pub project_name: String,
pub logo_initial: String,
pub primary_color: String,
pub accent_color: String,
pub density: Density,
}Expand description
Visual-only admin design config.
Defaults produce a calm, slate-and-indigo look that works out of the box. Projects override fields individually; unspecified fields fall back to the default.
Fields§
§project_name: StringName shown in the sidebar and page titles, e.g. “Workflowdesk”.
logo_initial: StringSingle character rendered in the square logo mark. Projects using longer glyphs should pick a wide character, e.g. “◈”.
primary_color: StringCSS colour used for the primary action button and the sidebar
logo-mark background. Accept hex (#0f172a), rgb(), hsl(), or
named colours. Values containing ;, {, }, <, or \
are rejected and replaced with the default at render time.
accent_color: StringCSS colour used for focus rings and hyperlinks.
density: DensityRow density for tables and forms.
Implementations§
Source§impl Design
impl Design
Sourcepub fn load() -> Self
pub fn load() -> Self
Load from rustio.design.json in the current working
directory, or return defaults if the file is missing /
unreadable / malformed.
Silently falls back on any error. Logging the parse failure is a project concern — we never want a bad design config to block the admin from rendering.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Design
impl<'de> Deserialize<'de> for Design
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Design
impl RefUnwindSafe for Design
impl Send for Design
impl Sync for Design
impl Unpin for Design
impl UnsafeUnpin for Design
impl UnwindSafe for Design
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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