pub struct GurtConfig {
pub server: ServerConfig,
pub tls: Option<TlsConfig>,
pub logging: Option<LoggingConfig>,
pub security: Option<SecurityConfig>,
pub error_pages: Option<ErrorPagesConfig>,
pub headers: Option<HashMap<String, String>>,
}Fields§
§server: ServerConfig§tls: Option<TlsConfig>§logging: Option<LoggingConfig>§security: Option<SecurityConfig>§error_pages: Option<ErrorPagesConfig>§headers: Option<HashMap<String, String>>Implementations§
Source§impl GurtConfig
impl GurtConfig
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn builder() -> GurtConfigBuilder
pub fn address(&self) -> String
pub fn max_message_size_bytes(&self) -> Result<u64>
pub fn get_handshake_timeout(&self) -> Duration
pub fn get_request_timeout(&self) -> Duration
pub fn get_connection_timeout(&self) -> Duration
pub fn should_deny_file(&self, file_path: &str) -> bool
pub fn is_method_allowed(&self, method: &str) -> bool
pub fn default_with_directory(base_dir: PathBuf) -> Self
pub fn from_toml(toml_content: &str, base_dir: PathBuf) -> Result<Self>
pub fn validate(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for GurtConfig
impl Clone for GurtConfig
Source§fn clone(&self) -> GurtConfig
fn clone(&self) -> GurtConfig
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 Debug for GurtConfig
impl Debug for GurtConfig
Source§impl Default for GurtConfig
impl Default for GurtConfig
Source§impl<'de> Deserialize<'de> for GurtConfig
impl<'de> Deserialize<'de> for GurtConfig
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 GurtConfig
impl RefUnwindSafe for GurtConfig
impl Send for GurtConfig
impl Sync for GurtConfig
impl Unpin for GurtConfig
impl UnsafeUnpin for GurtConfig
impl UnwindSafe for GurtConfig
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