2022-07-28 09:00:06 +00:00
|
|
|
use surrealdb::sql::thing;
|
2023-04-17 14:39:37 +00:00
|
|
|
use surrealdb::sql::value;
|
2022-07-28 09:00:06 +00:00
|
|
|
use surrealdb::sql::Thing;
|
|
|
|
use surrealdb::sql::Value;
|
|
|
|
|
|
|
|
pub trait Parse<T> {
|
|
|
|
fn parse(val: &str) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Parse<Value> for Value {
|
|
|
|
fn parse(val: &str) -> Value {
|
2023-04-17 14:39:37 +00:00
|
|
|
value(val).unwrap()
|
2022-07-28 09:00:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Parse<Thing> for Thing {
|
|
|
|
fn parse(val: &str) -> Thing {
|
|
|
|
thing(val).unwrap()
|
|
|
|
}
|
|
|
|
}
|