Expand description
§Reporters Database
A Rust port of the Free Law Project’s database of court reporters with zero runtime overhead.
This library provides access to a comprehensive database of legal court reporters, including their variations, editions, and citation formats. All data is embedded at compile time using Perfect Hash Functions (PHF) for optimal performance.
§Quick Start
use reporters_db::{get_reporters, get_variations_only};
// Get the main reporters database
let reporters = get_reporters();
if let Some(reporter_list) = reporters.get("A.2d") {
println!("Found {} reporters for 'A.2d'", reporter_list.len());
}
// Get variation mappings
let variations = get_variations_only();
if let Some(canonical_forms) = variations.get("Atlantic Reporter") {
println!("Canonical forms: {:?}", canonical_forms);
}§Main API Functions
get_reporters()- Main reporters databaseget_variations_only()- Variation to canonical mappingsget_editions()- Edition to reporter mappingsget_names_to_editions()- Reporter names to edition abbreviationsget_regex_variables()- Processed regex templates for citation parsing
§Performance
This library uses compile-time Perfect Hash Functions (PHF) for all data access, providing O(1) lookups with zero runtime overhead. All data is validated and embedded during compilation.
Re-exports§
pub use case_name_part_abbreviations::CaseNamePartAbbreviationMap;pub use journals::Journal;pub use journals::JournalsMap;pub use laws::Law;pub use laws::LawsMap;pub use regexes::RegexTemplate;pub use regexes::ResolvedRegex;pub use regexes::UnresolvedRegex;pub use reporters::CiteType;pub use reporters::Edition;pub use reporters::Reporter;pub use reporters::ReportersMap;pub use state_abbreviations::StateAbbreviationMap;
Modules§
- case_
name_ part_ abbreviations - journals
- laws
- regexes
- Regular expression templates for citation pattern matching.
- reporters
- Legal court reporters database module.
- state_
abbreviations - types
- utils
- Utility functions for processing and accessing reporter database information.
Enums§
Functions§
- get_
case_ name_ abbreviations - Get case name part abbreviations used in legal case names.
- get_
editions - Get editions mapping that maps edition keys to their root reporter name.
- get_
journals - Get the legal journals database.
- get_
laws - Get the laws database for statute citations.
- get_
names_ to_ editions - Get names to editions mapping that maps reporter names to their edition abbreviations.
- get_
regex_ variables - Get processed regex variables for citation pattern matching.
- get_
reporters - Get the main reporters database containing legal court reporters and their metadata.
- get_
special_ formats - Get special formats mapping for non-standard citation formats.
- get_
state_ abbreviations - Get state abbreviations mapping for US states.
- get_
variations_ only - Get variations mapping that maps variation names to canonical reporter abbreviations.