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§
Sourcefn surreal_type() -> &'static str
fn surreal_type() -> &'static str
The SurrealQL type name (e.g. "string", "datetime").
Sourcefn render_literal(value: &Self, buf: &mut String)
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".