Add tests and a Sizable trait for ContextElement.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user