Struct mas_data_model::SiteConfig
source · pub struct SiteConfig {Show 14 fields
pub access_token_ttl: Duration,
pub compat_token_ttl: Duration,
pub server_name: String,
pub policy_uri: Option<Url>,
pub tos_uri: Option<Url>,
pub imprint: Option<String>,
pub password_login_enabled: bool,
pub password_registration_enabled: bool,
pub email_change_allowed: bool,
pub displayname_change_allowed: bool,
pub password_change_allowed: bool,
pub account_recovery_allowed: bool,
pub captcha: Option<CaptchaConfig>,
pub minimum_password_complexity: u8,
}
Expand description
Random site configuration we want accessible in various places.
Fields§
§access_token_ttl: Duration
Time-to-live of access tokens.
compat_token_ttl: Duration
Time-to-live of compatibility access tokens.
server_name: String
The server name, e.g. “matrix.org”.
policy_uri: Option<Url>
The URL to the privacy policy.
tos_uri: Option<Url>
The URL to the terms of service.
imprint: Option<String>
Imprint to show in the footer.
password_login_enabled: bool
Whether password login is enabled.
password_registration_enabled: bool
Whether password registration is enabled.
email_change_allowed: bool
Whether users can change their email.
displayname_change_allowed: bool
Whether users can change their display name.
password_change_allowed: bool
Whether users can change their password.
account_recovery_allowed: bool
Whether users can recover their account via email.
captcha: Option<CaptchaConfig>
Captcha configuration
minimum_password_complexity: u8
Minimum password complexity, between 0 and 4. This is a score from zxcvbn.
Trait Implementations§
source§impl Clone for SiteConfig
impl Clone for SiteConfig
source§fn clone(&self) -> SiteConfig
fn clone(&self) -> SiteConfig
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 moreAuto Trait Implementations§
impl Freeze for SiteConfig
impl RefUnwindSafe for SiteConfig
impl Send for SiteConfig
impl Sync for SiteConfig
impl Unpin for SiteConfig
impl UnwindSafe for SiteConfig
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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