data_privacy 0.11.0

Data annotation and redaction system providing a robust way to manipulate sensitive information.
Documentation
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

#![expect(missing_docs, reason = "Test code")]

use data_privacy_macros::{RedactedDebug, RedactedDisplay, classified, taxonomy};

#[taxonomy(example)]
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum Taxonomy {
    A,
    B,
}

#[classified(Taxonomy::A)]
#[derive(Clone, Eq, PartialEq, Hash)]
struct EMailAddress(String);

#[derive(Clone, Eq, PartialEq, Hash, RedactedDisplay, RedactedDebug)]
struct Contact {
    #[unredacted]
    name: String,
    email: EMailAddress,
}

#[test]
fn can_create_instance() {
    let _ = Contact {
        name: "Alice".to_string(),
        email: EMailAddress("a@b.c".to_string()),
    };
}