pub struct BrandingCtx<'a> {
pub app_name: &'a str,
pub title_brand: &'a str,
pub accent: String,
pub accent_ink: &'static str,
pub accent_light: String,
pub accent_ink_light: &'static str,
pub logo_url: Option<&'a str>,
}Expand description
Projection of BrandingConfig into the flat context keys every pre-auth
template reads directly (not via branding.* dotted access): app_name,
logo_url, and the accent quad.
Handlers also emit branding => branding as a separate context key so
templates keep their existing dotted access to splash_*, forced_mode,
and font_* fields.
Fields§
§app_name: &'a str§title_brand: &'a str§accent: String§accent_ink: &'static str§accent_light: String§accent_ink_light: &'static str§logo_url: Option<&'a str>Implementations§
Source§impl<'a> BrandingCtx<'a>
impl<'a> BrandingCtx<'a>
pub fn from_branding(branding: Option<&'a BrandingConfig>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for BrandingCtx<'a>
impl<'a> RefUnwindSafe for BrandingCtx<'a>
impl<'a> Send for BrandingCtx<'a>
impl<'a> Sync for BrandingCtx<'a>
impl<'a> Unpin for BrandingCtx<'a>
impl<'a> UnsafeUnpin for BrandingCtx<'a>
impl<'a> UnwindSafe for BrandingCtx<'a>
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
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>
Converts
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>
Converts
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