Trait smartnoise_validator::components::Mechanism[][src]

pub trait Mechanism {
    fn get_privacy_usage(
        &self,
        privacy_definition: &PrivacyDefinition,
        release_usage: Option<&Vec<PrivacyUsage>>,
        properties: &NodeProperties
    ) -> Result<Option<Vec<PrivacyUsage>>>; }

Mechanism component trait

When a component is a Mechanism, it consumes a privacy budget.

Required methods

fn get_privacy_usage(
    &self,
    privacy_definition: &PrivacyDefinition,
    release_usage: Option<&Vec<PrivacyUsage>>,
    properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]

Extraction of privacy usage by the component.

By default, this returns the upper bound of the privacy usage of the component.

If the component has been evaluated, it is possible the actual usage of the component differs from the upper bound. In this case, the release_usage is returned.

Arguments

  • self - the protobuf object corresponding to the prost protobuf struct, containing an upper bound on privacy usage
  • privacy_definition - the definition of privacy under which the sensitivity is to be computed
  • release_usage - optionally, the privacy actually used by the mechanism (if it has already been released)
  • sensitivity_type - space for which the sensitivity is computed within

Returns

Privacy usages after group_size, c_stability and privacy amplification have been taken into account.

Loading content...

Implementors

impl Mechanism for Component[src]

impl Mechanism for ExponentialMechanism[src]

impl Mechanism for GaussianMechanism[src]

impl Mechanism for LaplaceMechanism[src]

impl Mechanism for SimpleGeometricMechanism[src]

impl Mechanism for SnappingMechanism[src]

Loading content...