pub struct Config {Show 14 fields
pub port: u16,
pub name: String,
pub description: String,
pub static_dir: PathBufD,
pub media_dir: PathBufD,
pub captcha: HCaptchaConfig,
pub real_ip_header: Option<String>,
pub registration_enabled: bool,
pub host: String,
pub snowflake_server_id: usize,
pub blocked_hosts: Vec<String>,
pub tiers: Tiers,
pub alert: String,
pub templates: TemplatesConfig,
}Expand description
Configuration file
Fields§
§port: u16The port to serve the server on
name: StringThe name of the site
description: StringThe description of the site
static_dir: PathBufDThe location of the static directory, should not be supplied manually as it will be overwritten with ./.config/static
media_dir: PathBufDThe location of media uploads on the file system
captcha: HCaptchaConfigHCaptcha configuration
real_ip_header: Option<String>The name of the header used for reading user IP address
registration_enabled: boolIf new profile registration is enabled
host: StringThe origin of the public server (ex: “https://rainbeam.net”)
Used in embeds and links.
snowflake_server_id: usizeThe server ID for ID generation
blocked_hosts: Vec<String>A list of image hosts that are blocked
tiers: TiersTiered benefits
alert: StringA global site announcement shown at the top of the page
templates: TemplatesConfigTemplate configuration.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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