Trait EdgedbPrim

Source
pub trait EdgedbPrim: Sized {
    const TYPE_CAST: &'static str;

    // Required methods
    fn from_edgedb_val(value: Value) -> Result<Self>;
    fn to_edgedb_val(self) -> Result<Value>;
}
Expand description

One of the primitive EdgeDB types, including JSON (see EdgedbJson). Implement this for your types if they are primitive-convertible.

Required Associated Constants§

Source

const TYPE_CAST: &'static str

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl EdgedbPrim for bool

Source§

const TYPE_CAST: &'static str = "bool"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for f32

Source§

const TYPE_CAST: &'static str = "float32"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for f64

Source§

const TYPE_CAST: &'static str = "float64"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for i16

Source§

const TYPE_CAST: &'static str = "int16"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for i32

Source§

const TYPE_CAST: &'static str = "int32"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for i64

Source§

const TYPE_CAST: &'static str = "int64"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for String

Source§

const TYPE_CAST: &'static str = "str"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Source§

impl EdgedbPrim for Uuid

Source§

const TYPE_CAST: &'static str = "uuid"

Source§

fn from_edgedb_val(value: Value) -> Result<Self>

Source§

fn to_edgedb_val(self) -> Result<Value>

Implementors§