serde
This commit is contained in:
parent
b3004b0db3
commit
e3c6740b1a
1 changed files with 6 additions and 0 deletions
|
@ -80,6 +80,12 @@ impl Validate for Reference {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Into<serde_json::Value> for Reference {
|
||||||
|
fn into(self) -> serde_json::Value {
|
||||||
|
serde_json::Value::String(self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A trait that allows you to get a reference to a `Model`
|
/// A trait that allows you to get a reference to a `Model`
|
||||||
pub trait Referencable {
|
pub trait Referencable {
|
||||||
/// The name of this model's collection
|
/// The name of this model's collection
|
||||||
|
|
Loading…
Reference in a new issue