Trait opendp::transformations::DropNullDomain

source ·
pub trait DropNullDomain: Domain {
    type Imputed;

    // Required method
    fn option(value: &Self::Carrier) -> Option<Self::Imputed>;
}
Expand description

Utility trait to drop null values from a dataset, regardless of the representation of nullity.

Required Associated Types§

source

type Imputed

This is the type of Self::Carrier after dropping null.

On any type D for which the DropNullDomain trait is implemented, the syntax D::Imputed refers to this associated type. For example, consider D to be OptionDomain<T>, the domain of all Option<T>. The implementation of this trait for DropNullDomain<T> designates that type Imputed = T. Thus DropNullDomain<T>::Imputed is T.

Required Methods§

source

fn option(value: &Self::Carrier) -> Option<Self::Imputed>

Standardizes D::Carrier into an Option<D::Imputed>, where D::Imputed is never null.

Self::Imputed may have the capacity to represent null (like f64), but implementations of this function must guarantee that Self::Imputed is never null.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: CheckAtom + InherentNull + Clone> DropNullDomain for AtomDomain<T>

how to standardize into an option, when null represented as T with internal nullity

§

type Imputed = T

source§

impl<T: CheckAtom + Clone> DropNullDomain for OptionDomain<AtomDomain<T>>

how to standardize into an option, when null represented as Option<T>

§

type Imputed = T