pub struct Config {
pub base_url: String,
pub password: Option<String>,
pub timeout: f64,
pub retries: u32,
pub tls_settings: Option<TlsSettings>,
pub proxy_config: Option<ProxyConfig>,
pub zstd: bool,
pub encryption_key: Option<String>,
}Expand description
Configuration for Rspamd client
Fields§
§base_url: StringBase URL of Rspamd server
password: Option<String>Optional API key for authentication
timeout: f64Timeout duration for requests
retries: u32Number of retries for requests
tls_settings: Option<TlsSettings>Custom TLS settings for the asynchronous client
proxy_config: Option<ProxyConfig>Proxy configuration for the asynchronous client
zstd: boolUse zstd compression
encryption_key: Option<String>Encryption key if using native HTTPCrypt encryption (must be in Rspamd base32 format)
Implementations§
Source§impl Config
impl Config
Sourcepub fn builder() -> ConfigBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> ConfigBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building Config.
On the builder, call .base_url(...), .password(...)(optional), .timeout(...)(optional), .retries(...)(optional), .tls_settings(...)(optional), .proxy_config(...)(optional), .zstd(...)(optional), .encryption_key(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Config.
Trait Implementations§
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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