| Crates.io | iab_gpp |
| lib.rs | iab_gpp |
| version | 0.1.2 |
| created_at | 2025-09-28 11:13:00.195906+00 |
| updated_at | 2025-12-15 00:14:57.01792+00 |
| description | IAB GPP Consent String implementation |
| homepage | https://github.com/noirotm/iabgpp-rs |
| repository | https://github.com/noirotm/iabgpp-rs |
| max_upload_size | |
| id | 1858247 |
| size | 214,503 |
Rust implementation of the IAB Global Privacy Platform (GPP) consent string specification.
Cargo.toml:
[dependencies]
iab-gpp = "0.1"
main.rs:
use std::error::Error;
use std::str::FromStr;
use iab_gpp::v1::GPPString;
fn main() {
let s = "DBABM~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA";
let gpp_str = GPPString::from_str(s).expect("a valid GPP string");
for &id in gpp_str.section_ids() {
println!("Section id: {:?}", id);
let section = gpp_str.decode_section(id).expect("a valid section");
println!("Section: {:?}", §ion);
}
}