Struct mpc_relay_server::ServerConfig
source · pub struct ServerConfig {
pub key: PathBuf,
pub session: SessionConfig,
pub tls: Option<TlsConfig>,
pub allow: Option<Vec<AccessKey>>,
pub deny: Option<Vec<AccessKey>>,
}Expand description
Configuration for the web server.
Fields§
§key: PathBufPath to the server key.
session: SessionConfigSettings 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.
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 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