Skip to main content

diff_priv/noise/
noiser.rs

1use crate::data_manipulation::anonymizable::{Anonymizable, QuasiIdentifierTypes};
2
3/// This trait lets you implement a custom noising function to add ε-differential privacy to
4/// a struct that implements `Anonymizable`
5/// DiffPriv already supports Laplace noise as a possible noiser
6pub trait Noiser: Default + Clone + Sync {
7    fn add_noise<M: Anonymizable>(&mut self, value: &M) -> Vec<QuasiIdentifierTypes>;
8}