Skip to main content

AsNullable

Trait AsNullable 

Source
pub trait AsNullable {
    // Required method
    fn as_nullable_as(&self, null: &'static str) -> NullableValue<'_>;

    // Provided method
    fn as_nullable(&self) -> NullableValue<'_> { ... }
}

Required Methods§

Source

fn as_nullable_as(&self, null: &'static str) -> NullableValue<'_>

Convert to NullableValue that implements Display representing no value as given string.

Provided Methods§

Source

fn as_nullable(&self) -> NullableValue<'_>

Convert to NullableValue that implements Display representing no value as “NULL”.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AsNullable for Option<Value>

Represent None as “NULL” and Some(Value) as value.

Source§

fn as_nullable_as(&self, null: &'static str) -> NullableValue<'_>

Implementors§