pub struct ServerConfig {Show 19 fields
pub name: String,
pub version: String,
pub description: Option<String>,
pub icons: Vec<Icon>,
pub website_url: Option<String>,
pub host: String,
pub port: u16,
pub transport_mode: String,
pub enable_sse: bool,
pub enable_oauth: bool,
pub max_connections: usize,
pub request_timeout_secs: u64,
pub response_timeout_secs: u64,
pub allowed_hosts: Vec<String>,
pub allowed_origins: Vec<String>,
pub cache: CacheConfig,
pub oauth: OAuthConfig,
pub logging: LoggingConfig,
pub performance: PerformanceConfig,
}Expand description
Server configuration
Fields§
§name: StringServer name
version: StringServer version
description: Option<String>Server description
icons: Vec<Icon>Server icons
website_url: Option<String>Website URL
host: StringHost address
port: u16Port
transport_mode: StringTransport mode
enable_sse: boolEnable SSE support
enable_oauth: boolEnable OAuth authentication
max_connections: usizeMaximum concurrent connections
request_timeout_secs: u64Request timeout (seconds)
response_timeout_secs: u64Response timeout (seconds)
allowed_hosts: Vec<String>Allowed hosts for CORS (e.g., ["localhost", "127.0.0.1"])
allowed_origins: Vec<String>Allowed origins for CORS (e.g., ["http://localhost:*"])
Use "*" only in development, specify exact origins in production
cache: CacheConfigCache configuration
oauth: OAuthConfigOAuth configuration
logging: LoggingConfigLogging configuration
performance: PerformanceConfigPerformance configuration
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
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 ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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