Skip to main content

SiteConfig

Struct SiteConfig 

Source
pub struct SiteConfig {
Show 52 fields pub instance_id: Option<String>, pub title: Option<String>, pub login_captcha: Option<bool>, pub reg_captcha: Option<bool>, pub forget_captcha: Option<bool>, pub abuse_report_captcha: Option<bool>, pub themes: Option<String>, pub default_theme: Option<String>, pub authn: Option<bool>, pub user: Option<NewUser>, pub captcha_re_captcha_key: Option<String>, pub captcha_cap_instance_url: Option<String>, pub captcha_cap_site_key: Option<String>, pub site_notice: Option<String>, pub captcha_type: Option<String>, pub turnstile_site_id: Option<String>, pub register_enabled: Option<bool>, pub qq_enabled: Option<bool>, pub sso_enabled: Option<bool>, pub sso_display_name: Option<String>, pub sso_icon: Option<String>, pub oidc_enabled: Option<bool>, pub oidc_display_name: Option<String>, pub oidc_icon: Option<String>, pub logo: Option<String>, pub logo_light: Option<String>, pub tos_url: Option<String>, pub privacy_policy_url: Option<String>, pub icons: Option<String>, pub emoji_preset: Option<String>, pub point_enabled: Option<bool>, pub share_point_gain_rate: Option<f64>, pub map_provider: Option<String>, pub google_map_tile_type: Option<String>, pub file_viewers: Option<Vec<FileViewer>>, pub max_batch_size: Option<f64>, pub app_promotion: Option<bool>, pub app_feedback: Option<String>, pub app_forum: Option<String>, pub payment: Option<PaymentSetting>, pub anonymous_purchase: Option<bool>, pub point_price: Option<f64>, pub shop_nav_enabled: Option<bool>, pub storage_products: Option<Vec<StorageProduct>>, pub group_skus: Option<Vec<GroupSKU>>, pub thumbnail_width: Option<f64>, pub thumbnail_height: Option<f64>, pub custom_props: Option<Vec<CustomProps>>, pub custom_nav_items: Option<Vec<CustomNavItem>>, pub custom_html: Option<CustomHTML>, pub mapbox_ak: Option<String>, pub thumb_exts: Option<Vec<String>>,
}
Expand description

Site configuration

Different sections return different fields. All fields are optional and use #[serde(default)] to handle missing data.

Fields§

§instance_id: Option<String>§title: Option<String>§login_captcha: Option<bool>§reg_captcha: Option<bool>§forget_captcha: Option<bool>§abuse_report_captcha: Option<bool>§themes: Option<String>§default_theme: Option<String>§authn: Option<bool>§user: Option<NewUser>§captcha_re_captcha_key: Option<String>§captcha_cap_instance_url: Option<String>§captcha_cap_site_key: Option<String>§site_notice: Option<String>§captcha_type: Option<String>§turnstile_site_id: Option<String>§register_enabled: Option<bool>§qq_enabled: Option<bool>§sso_enabled: Option<bool>§sso_display_name: Option<String>§sso_icon: Option<String>§oidc_enabled: Option<bool>§oidc_display_name: Option<String>§oidc_icon: Option<String>§logo_light: Option<String>§tos_url: Option<String>§privacy_policy_url: Option<String>§icons: Option<String>§emoji_preset: Option<String>§point_enabled: Option<bool>§share_point_gain_rate: Option<f64>§map_provider: Option<String>§google_map_tile_type: Option<String>§file_viewers: Option<Vec<FileViewer>>§max_batch_size: Option<f64>§app_promotion: Option<bool>§app_feedback: Option<String>§app_forum: Option<String>§payment: Option<PaymentSetting>§anonymous_purchase: Option<bool>§point_price: Option<f64>§shop_nav_enabled: Option<bool>§storage_products: Option<Vec<StorageProduct>>§group_skus: Option<Vec<GroupSKU>>§thumbnail_width: Option<f64>§thumbnail_height: Option<f64>§custom_props: Option<Vec<CustomProps>>§custom_nav_items: Option<Vec<CustomNavItem>>§custom_html: Option<CustomHTML>§mapbox_ak: Option<String>§thumb_exts: Option<Vec<String>>

Trait Implementations§

Source§

impl Clone for SiteConfig

Source§

fn clone(&self) -> SiteConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SiteConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SiteConfig

Source§

fn default() -> SiteConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SiteConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,