Struct cl_interpret::builtin::range_exc
source · pub struct range_exc;
Expand description
Exclusive Range a..b
ⓘ
builtin! fn range_exc (lhs, rhs) -> IResult<ConValue>
{
let (&ConValue::Int(lhs), &ConValue::Int(rhs)) =
(lhs, rhs) else { Err(Error::TypeError)? };
Ok(ConValue::RangeExc(lhs, rhs.saturating_sub(1)))
}
Trait Implementations§
source§impl Callable for range_exc
impl Callable for range_exc
source§fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
Calls this Callable in the provided Environment, with ConValue args
The Callable is responsible for checking the argument count and validating types
The Callable is responsible for checking the argument count and validating types
Auto Trait Implementations§
impl Freeze for range_exc
impl RefUnwindSafe for range_exc
impl Send for range_exc
impl Sync for range_exc
impl Unpin for range_exc
impl UnwindSafe for range_exc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more