pub struct BrandingConfig {Show 13 fields
pub application_name: String,
pub logo_url: Option<String>,
pub primary_color: Option<String>,
pub accent_hex: Option<String>,
pub accent_ink: Option<AccentInk>,
pub forced_mode: Option<Mode>,
pub font_css_url: Option<String>,
pub font_family: Option<String>,
pub splash_text: Option<String>,
pub splash_image_url: Option<String>,
pub splash_primitive: Option<SplashPrimitive>,
pub splash_url: Option<String>,
pub shader_cell_scale: Option<i64>,
}Expand description
Branding configuration for an application’s hosted auth pages.
Extracted from Application — contains only the fields needed to
theme login, register, consent, and other OIDC-flow pages.
Derives sqlx::FromRow for use with query_as in
get_branding_by_client_id. The SQL query aliases name to
application_name to match the struct field.
Fields§
§application_name: String§logo_url: Option<String>§primary_color: Option<String>§accent_hex: Option<String>§accent_ink: Option<AccentInk>§forced_mode: Option<Mode>§font_css_url: Option<String>§font_family: Option<String>§splash_text: Option<String>§splash_image_url: Option<String>§splash_primitive: Option<SplashPrimitive>§splash_url: Option<String>§shader_cell_scale: Option<i64>Implementations§
Source§impl BrandingConfig
impl BrandingConfig
Sourcepub fn new(application_name: impl Into<String>) -> Self
pub fn new(application_name: impl Into<String>) -> Self
Construct an all-defaults BrandingConfig with only the required
application_name set. Embedders use this as a starting point:
BrandingConfig::new("Transfer These Files").with_accent("#ff7a1a", AccentInk::Black).
pub fn with_accent(self, hex: impl Into<String>, ink: AccentInk) -> Self
pub fn with_primary_color(self, hex: impl Into<String>) -> Self
pub fn with_logo_url(self, url: impl Into<String>) -> Self
pub fn with_splash_text(self, text: impl Into<String>) -> Self
pub fn with_splash_image_url(self, url: impl Into<String>) -> Self
pub fn with_splash_primitive(self, primitive: SplashPrimitive) -> Self
pub fn with_shader_cell_scale(self, scale: i64) -> Self
Trait Implementations§
Source§impl Clone for BrandingConfig
impl Clone for BrandingConfig
Source§fn clone(&self) -> BrandingConfig
fn clone(&self) -> BrandingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrandingConfig
impl Debug for BrandingConfig
Source§impl<'a, R: Row> FromRow<'a, R> for BrandingConfigwhere
&'a str: ColumnIndex<R>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<AccentInk>: Decode<'a, R::Database> + Type<R::Database>,
Option<Mode>: Decode<'a, R::Database> + Type<R::Database>,
Option<SplashPrimitive>: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for BrandingConfigwhere
&'a str: ColumnIndex<R>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<AccentInk>: Decode<'a, R::Database> + Type<R::Database>,
Option<Mode>: Decode<'a, R::Database> + Type<R::Database>,
Option<SplashPrimitive>: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for BrandingConfig
impl RefUnwindSafe for BrandingConfig
impl Send for BrandingConfig
impl Sync for BrandingConfig
impl Unpin for BrandingConfig
impl UnsafeUnpin for BrandingConfig
impl UnwindSafe for BrandingConfig
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> 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>
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