Add stubs for the math functions.

master
Tom Alexander 4 years ago
parent 2c5c2d239c
commit d8b8c223f0
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -439,6 +439,34 @@ impl CompareContextElement for serde_json::Value {
.map(IceResult::from_owned),
}
}
fn math_subtract<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_multiply<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_divide<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_modulus<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_abs<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
fn math_floor<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
fn math_ceil<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
}
#[derive(Debug)]

@ -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 {

@ -373,4 +373,32 @@ impl CompareContextElement for OwnedLiteral {
},
}
}
fn math_subtract<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_multiply<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_divide<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_modulus<'a>(&self, other: &dyn ContextElement) -> Option<IceResult<'a>> {
todo!()
}
fn math_abs<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
fn math_floor<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
fn math_ceil<'a>(&self) -> Option<IceResult<'a>> {
todo!()
}
}

Loading…
Cancel
Save