Trait zvariant::NoneValue[][src]

pub trait NoneValue {
    type NoneType;
    fn null_value() -> Self::NoneType;
}
Expand description

Type that uses a special value to be used as none.

See Optional documentation for the rationale for this trait’s existence.

Caveats

Since use of default values as none is typical, this trait is implemented for all types that implement Default for convenience. Unfortunately, this means you can not implement this trait manually for types that implement Default.

Associated Types

Required methods

The none-equivalent value.

Implementors