pub struct PlatformConfig {Show 16 fields
pub app: AppConfig,
pub server: ServerConfig,
pub http: HttpConfig,
pub tls: TlsConfig,
pub database: DatabaseConfig,
pub storage: StorageConfig,
pub cache: CacheConfig,
pub i18n: I18nConfig,
pub seo: SeoConfig,
pub sites: Vec<SiteConfig>,
pub auth: AuthConfig,
pub modules: ModulesConfig,
pub wasm: WasmConfig,
pub jobs: JobsConfig,
pub observability: ObservabilityConfig,
pub assets: AssetsConfig,
}Fields§
§app: AppConfig§server: ServerConfig§http: HttpConfig§tls: TlsConfig§database: DatabaseConfig§storage: StorageConfig§cache: CacheConfig§i18n: I18nConfig§seo: SeoConfig§sites: Vec<SiteConfig>§auth: AuthConfig§modules: ModulesConfig§wasm: WasmConfig§jobs: JobsConfig§observability: ObservabilityConfig§assets: AssetsConfigImplementations§
Source§impl PlatformConfig
impl PlatformConfig
pub fn from_toml_str(input: &str) -> Result<PlatformConfig, ConfigError>
pub fn from_toml_str_with_overlays<'a>( input: &str, overlays: impl IntoIterator<Item = &'a str>, ) -> Result<PlatformConfig, ConfigError>
pub fn from_file(path: impl AsRef<Path>) -> Result<PlatformConfig, ConfigError>
pub fn from_toml_str_with_env_overlays( input: &str, env_vars: &[&str], ) -> Result<PlatformConfig, ConfigError>
pub fn render_effective_toml(&self) -> Result<String, Error>
pub fn site_for_host(&self, host: &str) -> Option<&SiteConfig>
pub fn site_for_id(&self, site_id: &str) -> Option<&SiteConfig>
pub fn default_site(&self) -> Option<&SiteConfig>
pub fn canonical_host_for_site(&self, site_id: Option<&str>) -> &str
pub fn default_locale_for_site(&self, site_id: Option<&str>) -> &str
pub fn supported_locales_for_site(&self, site_id: Option<&str>) -> &[String]
pub fn localized_routes_for_site(&self, site_id: Option<&str>) -> bool
Source§impl PlatformConfig
impl PlatformConfig
pub fn validate(&self) -> Result<(), ConfigValidationErrors>
Trait Implementations§
Source§impl Clone for PlatformConfig
impl Clone for PlatformConfig
Source§fn clone(&self) -> PlatformConfig
fn clone(&self) -> PlatformConfig
Returns a duplicate 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 PlatformConfig
impl Debug for PlatformConfig
Source§impl<'de> Deserialize<'de> for PlatformConfig
impl<'de> Deserialize<'de> for PlatformConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlatformConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlatformConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PlatformConfig
impl PartialEq for PlatformConfig
Source§impl Serialize for PlatformConfig
impl Serialize for PlatformConfig
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PlatformConfig
Auto Trait Implementations§
impl Freeze for PlatformConfig
impl RefUnwindSafe for PlatformConfig
impl Send for PlatformConfig
impl Sync for PlatformConfig
impl Unpin for PlatformConfig
impl UnsafeUnpin for PlatformConfig
impl UnwindSafe for PlatformConfig
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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