| Crates.io | capitol |
| lib.rs | capitol |
| version | 0.6.0 |
| created_at | 2025-01-17 19:04:33.049292+00 |
| updated_at | 2026-01-22 18:14:37.24247+00 |
| description | Parse United States Congress legislative document citations |
| homepage | |
| repository | https://codeberg.org/blackerby/capitol |
| max_upload_size | |
| id | 1520902 |
| size | 45,637 |
Capitol is a Rust library for converting citation strings for United States Congressional documents, e.g., 118hr815 representing the H.R.815 in the 118th Congress, into Rust types. These Rust types can be printed as URLs on Congress.gov or Govinfo, depending on the type of document.
In the current release, citations for bills, resolutions, commitee prints and reports from either chamber, public laws, and statutes at large are implemented. For example, calling Citation::parse with the argument 118hr815 returns the following:
Citation::Measure {
congress: Some(Congress(118)),
chamber: Chamber::House,
measure_type: MeasureType::Bill,
number: 815,
version: None
}
Calling to_url on that struct return https://www.congress.gov/bill/118th-congress/house-bill/815.
Capitol is available from crates.io.