Skip to main content

RawValue

Trait RawValue 

Source
pub trait RawValue {
    type Raw;

    // Required method
    fn to_raw(&self) -> Self::Raw;
}
Expand description

A domain field type with a raw value behind it: the value filters compare with and merge patches bind.

Scalars, String and the chrono date-time types are their own raw value. A value object gets this from #[derive(RawValue)], with the raw value of the type it wraps; Option<T> has the optional raw value of T.

Required Associated Types§

Source

type Raw

The raw value type.

Required Methods§

Source

fn to_raw(&self) -> Self::Raw

A copy of the raw value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl RawValue for DateTime<Utc>

Source§

impl RawValue for NaiveDate

Source§

impl RawValue for NaiveDateTime

Source§

impl RawValue for NaiveTime

Source§

impl RawValue for String

Source§

impl RawValue for bool

Source§

type Raw = bool

Source§

fn to_raw(&self) -> <bool as RawValue>::Raw

Source§

impl RawValue for f32

Source§

type Raw = f32

Source§

fn to_raw(&self) -> <f32 as RawValue>::Raw

Source§

impl RawValue for f64

Source§

type Raw = f64

Source§

fn to_raw(&self) -> <f64 as RawValue>::Raw

Source§

impl RawValue for i8

Source§

type Raw = i8

Source§

fn to_raw(&self) -> <i8 as RawValue>::Raw

Source§

impl RawValue for i16

Source§

type Raw = i16

Source§

fn to_raw(&self) -> <i16 as RawValue>::Raw

Source§

impl RawValue for i32

Source§

type Raw = i32

Source§

fn to_raw(&self) -> <i32 as RawValue>::Raw

Source§

impl RawValue for i64

Source§

type Raw = i64

Source§

fn to_raw(&self) -> <i64 as RawValue>::Raw

Source§

impl RawValue for u8

Source§

type Raw = u8

Source§

fn to_raw(&self) -> <u8 as RawValue>::Raw

Source§

impl RawValue for u16

Source§

type Raw = u16

Source§

fn to_raw(&self) -> <u16 as RawValue>::Raw

Source§

impl RawValue for u32

Source§

type Raw = u32

Source§

fn to_raw(&self) -> <u32 as RawValue>::Raw

Source§

impl RawValue for u64

Source§

type Raw = u64

Source§

fn to_raw(&self) -> <u64 as RawValue>::Raw

Source§

impl<T> RawValue for Option<T>
where T: RawValue,

Source§

type Raw = Option<<T as RawValue>::Raw>

Source§

fn to_raw(&self) -> <Option<T> as RawValue>::Raw

Implementors§