pub struct ServerConfig {
pub key: PathBuf,
pub pattern: Option<String>,
pub session: SessionConfig,
pub tls: Option<TlsConfig>,
pub allow: Option<Vec<AccessKey>>,
pub deny: Option<Vec<AccessKey>>,
pub cors: CorsConfig,
}
Expand description
Configuration for the web server.
Fields§
§key: PathBuf
Path to the server key.
pattern: Option<String>
Optional noise parameters pattern.
session: SessionConfig
Settings for session management.
tls: Option<TlsConfig>
Configuration for TLS encryption.
allow: Option<Vec<AccessKey>>
Allow access to clients with these public keys.
deny: Option<Vec<AccessKey>>
Deny access to clients with these public keys.
cors: CorsConfig
Configuration for CORS.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn is_allowed_access(&self, key: impl AsRef<[u8]>) -> bool
pub fn is_allowed_access(&self, key: impl AsRef<[u8]>) -> bool
Determine if a public key is allowed access.
Trait Implementations§
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: 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 ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin 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