Module database

Module database 

Source
Expand description

Unified database API Unified Database API

Provides a single interface for querying databases that contain:

  • IP address data (using binary search tree)
  • Pattern data (using Aho-Corasick automaton)
  • Combined databases with both IP and pattern data

The database format is automatically detected and the appropriate lookup method is used transparently.

Re-exports§

pub use crate::updater::FallbackCallback;
pub use crate::updater::FallbackEvent;
pub use crate::updater::ReloadCallback;
pub use crate::updater::ReloadEvent;
pub use crate::updater::ReloadSource;

Structs§

Database
Unified database for IP and pattern lookups. Supports optional live-reloading when opened with .watch() or .auto_update().
DatabaseOpener
Builder for opening databases with custom configuration
DatabaseOptions
Options for opening a database
DatabaseStats
Statistics for database queries and cache performance Uses atomic counters for thread-safe access across all threads
DatabaseStatsSnapshot
Snapshot of database statistics at a point in time
LookupRef
Zero-allocation lookup result for C API. Stores offsets into mmap’d data instead of owned values.

Enums§

DatabaseError
Database error type
QueryResult
Query result from a database lookup