pub struct DifferentialPrivacy { /* private fields */ }Expand description
Differential privacy
Implementations§
Source§impl DifferentialPrivacy
impl DifferentialPrivacy
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), StatisticalError>
Sourcepub fn noise_mechanisms(&self) -> &[NoiseMechanism]
pub fn noise_mechanisms(&self) -> &[NoiseMechanism]
Returns the list of noise mechanisms available to this DP engine.
Sourcepub fn add_noise_mechanism(&mut self, mechanism: NoiseMechanism)
pub fn add_noise_mechanism(&mut self, mechanism: NoiseMechanism)
Register an additional noise mechanism if not already present.
Sourcepub fn supports_noise_mechanism(&self, mechanism: &NoiseMechanism) -> bool
pub fn supports_noise_mechanism(&self, mechanism: &NoiseMechanism) -> bool
Returns true when the given noise mechanism is registered.
Sourcepub fn privacy_accountant(&self) -> &PrivacyAccountant
pub fn privacy_accountant(&self) -> &PrivacyAccountant
Returns a reference to the privacy accountant tracking epsilon/delta spend.
Sourcepub fn privacy_accountant_mut(&mut self) -> &mut PrivacyAccountant
pub fn privacy_accountant_mut(&mut self) -> &mut PrivacyAccountant
Returns a mutable reference to the privacy accountant.
Sourcepub fn spend_budget(
&mut self,
epsilon: f64,
delta: f64,
) -> Result<(), StatisticalError>
pub fn spend_budget( &mut self, epsilon: f64, delta: f64, ) -> Result<(), StatisticalError>
Spend epsilon/delta from the privacy budget, recording the
consumption in the accountant. Returns Err when the budget is
insufficient.
Auto Trait Implementations§
impl Freeze for DifferentialPrivacy
impl RefUnwindSafe for DifferentialPrivacy
impl Send for DifferentialPrivacy
impl Sync for DifferentialPrivacy
impl Unpin for DifferentialPrivacy
impl UnsafeUnpin for DifferentialPrivacy
impl UnwindSafe for DifferentialPrivacy
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more