Struct cl_interpret::builtin::not
source · pub struct not;
Expand description
Inverts the ConValue
ⓘ
builtin! fn not (tail) -> IResult<ConValue>
{
Ok(match tail {
ConValue::Empty => ConValue::Empty,
ConValue::Int(v) => ConValue::Int(!v),
ConValue::Bool(v) => ConValue::Bool(!v),
_ => Err(Error::TypeError)?,
})
}
Trait Implementations§
source§impl Callable for not
impl Callable for not
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 not
impl RefUnwindSafe for not
impl Send for not
impl Sync for not
impl Unpin for not
impl UnwindSafe for not
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