Skip to main content

SurrealQL

Trait SurrealQL 

Source
pub trait SurrealQL:
    Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn surreal_type() -> &'static str;
    fn render_literal(value: &Self, buf: &mut String);
}
Expand description

A Rust type that can be rendered as a SurrealQL literal (the right-hand side of comparisons, SET values, etc.). Implemented for the common scalar types, Option<T>, serde_json::Value, the geometry types, and Thing<T>.

Required Methods§

Source

fn surreal_type() -> &'static str

The SurrealQL type name (e.g. "string", "datetime").

Source

fn render_literal(value: &Self, buf: &mut String)

Append the literal form of value to buf (with any needed quoting/escaping).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SurrealQL for DateTime<Utc>

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for String

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for Uuid

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for Value

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for bool

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for f32

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for f64

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for i8

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for i16

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for i32

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for i64

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for u8

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for u16

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for u32

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl SurrealQL for u64

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Source§

impl<T: SurrealQL> SurrealQL for Option<T>

Source§

fn surreal_type() -> &'static str

Source§

fn render_literal(value: &Self, buf: &mut String)

Implementors§