21 lines
359 B
Rust
21 lines
359 B
Rust
use surrealdb::sql::thing;
|
|
use surrealdb::sql::value;
|
|
use surrealdb::sql::Thing;
|
|
use surrealdb::sql::Value;
|
|
|
|
#[allow(dead_code)]
|
|
pub trait Parse<T> {
|
|
fn parse(val: &str) -> T;
|
|
}
|
|
|
|
impl Parse<Value> for Value {
|
|
fn parse(val: &str) -> Value {
|
|
value(val).unwrap()
|
|
}
|
|
}
|
|
|
|
impl Parse<Thing> for Thing {
|
|
fn parse(val: &str) -> Thing {
|
|
thing(val).unwrap()
|
|
}
|
|
}
|