pub struct GeoipConfig {
pub source: String,
pub path: Option<String>,
pub url: Option<String>,
pub auto_update: bool,
pub interval: u64,
pub cache_path: Option<String>,
}Expand description
GeoIP MaxMind database configuration.
Loading priority: path > url > source (built-in CDN).
When auto_update is true and no path is set, the database
is periodically re-downloaded in the background.
Fields§
§source: StringBuilt-in source name (e.g., “geolite2-country”, “dbip-city”).
path: Option<String>Local file path (highest priority — skips download).
url: Option<String>Custom remote URL (overrides the built-in CDN URL for source).
auto_update: boolEnable automatic background updates.
interval: u64Update interval in seconds (default: 7 days = 604800).
cache_path: Option<String>Cache file path for downloaded databases.
Trait Implementations§
Source§impl Clone for GeoipConfig
impl Clone for GeoipConfig
Source§fn clone(&self) -> GeoipConfig
fn clone(&self) -> GeoipConfig
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 GeoipConfig
impl Debug for GeoipConfig
Source§impl Default for GeoipConfig
impl Default for GeoipConfig
Source§impl<'de> Deserialize<'de> for GeoipConfig
impl<'de> Deserialize<'de> for GeoipConfig
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 GeoipConfig
impl RefUnwindSafe for GeoipConfig
impl Send for GeoipConfig
impl Sync for GeoipConfig
impl Unpin for GeoipConfig
impl UnsafeUnpin for GeoipConfig
impl UnwindSafe for GeoipConfig
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