|
|
|
@ -69,6 +69,13 @@ pub trait CompareContextElement: CastToAny {
|
|
|
|
|
fn partial_compare(&self, other: &dyn ContextElement) -> Option<Ordering>;
|
|
|
|
|
|
|
|
|
|
fn math_add<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_subtract<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_multiply<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_divide<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_modulus<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_abs<'a>(&self) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_floor<'a>(&self) -> Option<IceResult<'a>>;
|
|
|
|
|
fn math_ceil<'a>(&self) -> Option<IceResult<'a>>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<C: 'static + ContextElement> CastToAny for C {
|
|
|
|
|