Add stubs for the math functions.
This commit is contained in:
parent
2c5c2d239c
commit
d8b8c223f0
28
src/bin.rs
28
src/bin.rs
@ -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…
Reference in New Issue
Block a user