Starting a type casting trait

This commit is contained in:
Tom Alexander
2020-06-13 19:39:31 -04:00
parent 11096d7ece
commit 9eb70f436c
5 changed files with 27 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ use parser::Filter;
use parser::OwnedLiteral;
use parser::Template;
use renderer::compile_template;
use renderer::Castable;
use renderer::CompileError;
use renderer::ContextElement;
use renderer::DustRenderer;
@@ -312,6 +313,12 @@ impl Loopable for serde_json::Value {
}
}
impl Castable for serde_json::Value {
fn cast_to_type<'a>(&'a self, target: &str) -> Option<IceResult<'a>> {
todo!()
}
}
impl CompareContextElement for serde_json::Value {
fn equals(&self, other: &dyn ContextElement) -> bool {
// Handle other serde_json::Value