pub struct ServerOptions {
pub registration_enabled: bool,
pub captcha: HCaptchaConfig,
pub real_ip_header: Option<String>,
pub static_dir: String,
pub host: String,
pub citrus_id: String,
pub blocked_hosts: Vec<String>,
pub secure: bool,
}
Fields§
§registration_enabled: bool
If new registrations are enabled
captcha: HCaptchaConfig
HCaptcha configuration
real_ip_header: Option<String>
The header to read user IP from
static_dir: String
The directory to serve static assets from
host: String
The origin of the public server (ex: “https://rainbeam.net”)
Used in embeds and links.
citrus_id: String
The hostname of the public server (for Citrus)
Same as host
, just without the protocol.
blocked_hosts: Vec<String>
A list of image hosts that are blocked
secure: bool
If Citrus should use https or http
Trait Implementations§
source§impl Clone for ServerOptions
impl Clone for ServerOptions
source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
Returns a copy 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 ServerOptions
impl Debug for ServerOptions
source§impl Default for ServerOptions
impl Default for ServerOptions
source§impl<'de> Deserialize<'de> for ServerOptions
impl<'de> Deserialize<'de> for ServerOptions
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 ServerOptions
impl RefUnwindSafe for ServerOptions
impl Send for ServerOptions
impl Sync for ServerOptions
impl Unpin for ServerOptions
impl UnwindSafe for ServerOptions
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,
§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>
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