next_web_dev/autoconfigure/context/
next_properties.rs1use next_web_core::autoconfigure::context::{
2 application_properties::AppliationProperties, logger_properties::LoggerProperties,
3 message_source_properties::MessageSourceProperties, server_properties::ServerProperties,
4};
5
6use super::security_properties::SecurityProperties;
7
8#[derive(Debug, Clone, serde::Deserialize, Default)]
9pub struct NextProperties {
10 server: ServerProperties,
11 appliation: Option<AppliationProperties>,
12 messages: Option<MessageSourceProperties>,
13 logger: Option<LoggerProperties>,
14 security: Option<SecurityProperties>,
15}
16
17impl NextProperties {
18 pub fn server(&self) -> &ServerProperties {
19 &self.server
20 }
21 pub fn messages(&self) -> Option<&MessageSourceProperties> {
22 self.messages.as_ref()
23 }
24
25 pub fn appliation(&self) -> Option<&AppliationProperties> {
26 self.appliation.as_ref()
27 }
28
29 pub fn logger(&self) -> Option<&LoggerProperties> {
30 self.logger.as_ref()
31 }
32
33 pub fn security(&self) -> Option<&SecurityProperties> {
34 self.security.as_ref()
35 }
36}