Skip to main content

Nullability

Trait Nullability 

Source
pub trait Nullability: Sealed {
    type Item<T>;
    type Collection<T, Buffer: BufferType>;

    const NULLABLE: bool;
}
Expand description

Nullability trait for nullable and non-nullable type constructors

Required Associated Constants§

Source

const NULLABLE: bool

true iff this is Nullable.

Required Associated Types§

Source

type Item<T>

Constructor for nullable and non-nullable items.

Generic over an item T.

Source

type Collection<T, Buffer: BufferType>

Constructor for nullable and non-nullable collections.

Generic over a collection T and a BufferType.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Nullability for NonNullable

Source§

const NULLABLE: bool = false

Source§

type Item<T> = T

Source§

type Collection<T, Buffer: BufferType> = T

Source§

impl Nullability for Nullable

Source§

const NULLABLE: bool = true

Source§

type Item<T> = Option<T>

Source§

type Collection<T, Buffer: BufferType> = Validity<T, Buffer>