Skip to main content

FieldValue

Trait FieldValue 

Source
pub trait FieldValue {
    // Required methods
    fn inspect(&self) -> Inspected;
    fn db_value(&self) -> DbValue;
}
Expand description

A value that can be validated. Implemented for strings, numbers, bool, Option<T> and Vec<T>.

Required Methods§

Source

fn inspect(&self) -> Inspected

What rules see of the value.

Source

fn db_value(&self) -> DbValue

The value as a query parameter, for unique and exists.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FieldValue for DateTime<Utc>

Source§

impl FieldValue for NaiveDate

Source§

impl FieldValue for NaiveDateTime

Source§

impl FieldValue for String

Source§

impl FieldValue for bool

Source§

impl FieldValue for f32

Source§

impl FieldValue for f64

Source§

impl FieldValue for i8

Source§

impl FieldValue for i16

Source§

impl FieldValue for i32

Source§

impl FieldValue for i64

Source§

impl FieldValue for str

Source§

impl FieldValue for u8

Source§

impl FieldValue for u16

Source§

impl FieldValue for u32

Source§

impl<T: FieldValue + ?Sized> FieldValue for &T

Source§

impl<T: FieldValue> FieldValue for Option<T>

Source§

impl<T> FieldValue for Vec<T>

Implementors§