pub struct ApplicationConfig {
pub name: Option<String>,
pub environment: Option<String>,
pub graceful_shutdown: bool,
}Expand description
Configuration structure for the Sword application.
This struct contains only global application configuration.
Engine-specific settings live in their own sections such as [web], [grpc],
and [socketio].
Fields§
§name: Option<String>Optional name of the application. Defaults None.
This can be used for logging or display purposes.
environment: Option<String>Optional environment name (e.g., “development”, “production”).
This can be used to alter behavior based on the environment. Defaults None.
graceful_shutdown: boolWhether to enable graceful shutdown of the server.
If true, the server will finish processing ongoing requests
before shutting down when a termination signal is received.
Defaults false
Trait Implementations§
Source§impl Clone for ApplicationConfig
impl Clone for ApplicationConfig
Source§fn clone(&self) -> ApplicationConfig
fn clone(&self) -> ApplicationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigItem for ApplicationConfig
impl ConfigItem for ApplicationConfig
Source§impl Debug for ApplicationConfig
impl Debug for ApplicationConfig
Source§impl Default for ApplicationConfig
impl Default for ApplicationConfig
Source§fn default() -> ApplicationConfig
fn default() -> ApplicationConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApplicationConfigwhere
ApplicationConfig: Default,
impl<'de> Deserialize<'de> for ApplicationConfigwhere
ApplicationConfig: Default,
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 ApplicationConfig
impl RefUnwindSafe for ApplicationConfig
impl Send for ApplicationConfig
impl Sync for ApplicationConfig
impl Unpin for ApplicationConfig
impl UnsafeUnpin for ApplicationConfig
impl UnwindSafe for ApplicationConfig
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