NullOr

Trait NullOr 

Source
pub trait NullOr<Rhs: Nullability>: Nullability {
    type Output: Nullability;
}
Expand description

Combine nullability: if either input is nullable, output is nullable.

This follows SQL’s NULL propagation semantics where operations on NULL values produce NULL results.

§Truth Table

LeftRightOutput
NonNullNonNullNonNull
NonNullNullNull
NullNonNullNull
NullNullNull

Required Associated Types§

Source

type Output: Nullability

The resulting nullability.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§