Adding trait to cast to Any.
This commit is contained in:
parent
c438653449
commit
f386e5c31b
@ -1,6 +1,7 @@
|
||||
use crate::parser::Filter;
|
||||
use crate::renderer::errors::RenderError;
|
||||
use crate::renderer::errors::WalkError;
|
||||
use std::any::Any;
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub trait ContextElement: Debug + Walkable + Renderable + Loopable {}
|
||||
@ -26,6 +27,10 @@ pub trait Loopable {
|
||||
fn get_loop_elements(&self) -> Vec<&dyn ContextElement>;
|
||||
}
|
||||
|
||||
pub trait CompareContextElement {
|
||||
fn to_any(&self) -> &dyn Any;
|
||||
}
|
||||
|
||||
// impl PartialEq<dyn ContextElement> for dyn ContextElement {
|
||||
// fn eq(&self, other: &dyn ContextElement) -> bool {
|
||||
// todo!()
|
||||
|
Loading…
x
Reference in New Issue
Block a user