mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 18:31:53 +00:00
option model
This commit is contained in:
@@ -162,6 +162,11 @@ fn build_model_struct(
|
||||
#model_name(#inner_model::from(ptr))
|
||||
}
|
||||
}
|
||||
impl AsRef<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn as_ref(&self) -> &patch_db::json_ptr::JsonPointer {
|
||||
self.0.as_ref()
|
||||
}
|
||||
}
|
||||
impl From<patch_db::Model<#base_name>> for #model_name {
|
||||
fn from(model: patch_db::Model<#base_name>) -> Self {
|
||||
#model_name(#inner_model::from(patch_db::json_ptr::JsonPointer::from(model)))
|
||||
@@ -237,6 +242,11 @@ fn build_model_struct(
|
||||
#model_name(From::from(ptr))
|
||||
}
|
||||
}
|
||||
impl AsRef<patch_db::json_ptr::JsonPointer> for #model_name {
|
||||
fn as_ref(&self) -> &patch_db::json_ptr::JsonPointer {
|
||||
self.0.as_ref()
|
||||
}
|
||||
}
|
||||
impl From<patch_db::Model<#base_name>> for #model_name {
|
||||
fn from(model: patch_db::Model<#base_name>) -> Self {
|
||||
#model_name(model)
|
||||
|
||||
Reference in New Issue
Block a user