Add tests and a Sizable trait for ContextElement.

This commit is contained in:
Tom Alexander
2020-06-14 12:54:03 -04:00
parent 76193bf806
commit 1a54e35736
15 changed files with 66 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ pub trait ContextElement:
+ FromContextElement
+ IntoRcIce
+ Castable
+ Sizable
{
}
@@ -63,6 +64,10 @@ pub trait Castable {
fn cast_to_type<'a>(&'a self, target: &str) -> Option<IceResult<'a>>;
}
pub trait Sizable {
fn get_size<'a>(&'a self) -> Option<IceResult<'a>>;
}
pub trait CastToAny {
fn to_any(&self) -> &dyn Any;
}