pub struct Config {Show 15 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,
pub plugin_verify: bool,
}
Expand description
Configuration file
Fields§
§port: u16
The port to serve the server on
name: String
The name of the site
description: String
The description of the site
static_dir: PathBufD
The location of the static directory, should not be supplied manually as it will be overwritten with ./.config/static
media_dir: PathBufD
The location of media uploads on the file system
captcha: HCaptchaConfig
HCaptcha configuration
real_ip_header: Option<String>
The name of the header used for reading user IP address
registration_enabled: bool
If new profile registration is enabled
host: String
The origin of the public server (ex: “https://rainbeam.net”)
Used in embeds and links.
snowflake_server_id: usize
The server ID for ID generation
blocked_hosts: Vec<String>
A list of image hosts that are blocked
tiers: Tiers
Tiered benefits
alert: String
A global site announcement shown at the top of the page
templates: TemplatesConfig
Template configuration.
plugin_verify: bool
If plugins are verified through Neospring assets. Disabling this removed plugin verification, but will ensure your server doesn’t communicate with the main Neospring server at all.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Config
impl Serialize for Config
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.