pub enum NumericResult {
Real(f64),
Complex(Complex<f64>),
}Expand description
Result of evaluating a compiled expression — either a real or complex number.
Variants§
Implementations§
Source§impl NumericResult
impl NumericResult
pub fn is_complex(&self) -> bool
pub fn to_complex(self) -> Complex<f64>
pub fn to_f64(self) -> Option<f64>
pub fn pow(self, exp: NumericResult) -> NumericResult
pub fn modulo(self, rhs: NumericResult) -> NumericResult
pub fn sqrt(self) -> NumericResult
Trait Implementations§
Source§impl Add for NumericResult
impl Add for NumericResult
Source§type Output = NumericResult
type Output = NumericResult
The resulting type after applying the
+ operator.Source§fn add(self, rhs: NumericResult) -> NumericResult
fn add(self, rhs: NumericResult) -> NumericResult
Performs the
+ operation. Read moreSource§impl Clone for NumericResult
impl Clone for NumericResult
Source§fn clone(&self) -> NumericResult
fn clone(&self) -> NumericResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumericResult
impl Debug for NumericResult
Source§impl<'de> Deserialize<'de> for NumericResult
impl<'de> Deserialize<'de> for NumericResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Div for NumericResult
impl Div for NumericResult
Source§type Output = NumericResult
type Output = NumericResult
The resulting type after applying the
/ operator.Source§fn div(self, rhs: NumericResult) -> NumericResult
fn div(self, rhs: NumericResult) -> NumericResult
Performs the
/ operation. Read moreSource§impl From<f64> for NumericResult
impl From<f64> for NumericResult
Source§impl From<i64> for NumericResult
impl From<i64> for NumericResult
Source§impl Mul for NumericResult
impl Mul for NumericResult
Source§type Output = NumericResult
type Output = NumericResult
The resulting type after applying the
* operator.Source§fn mul(self, rhs: NumericResult) -> NumericResult
fn mul(self, rhs: NumericResult) -> NumericResult
Performs the
* operation. Read moreSource§impl Neg for NumericResult
impl Neg for NumericResult
Source§type Output = NumericResult
type Output = NumericResult
The resulting type after applying the
- operator.Source§fn neg(self) -> NumericResult
fn neg(self) -> NumericResult
Performs the unary
- operation. Read moreSource§impl PartialEq for NumericResult
impl PartialEq for NumericResult
Source§impl Serialize for NumericResult
impl Serialize for NumericResult
Source§impl Sub for NumericResult
impl Sub for NumericResult
Source§type Output = NumericResult
type Output = NumericResult
The resulting type after applying the
- operator.Source§fn sub(self, rhs: NumericResult) -> NumericResult
fn sub(self, rhs: NumericResult) -> NumericResult
Performs the
- operation. Read moreimpl Copy for NumericResult
impl StructuralPartialEq for NumericResult
Auto Trait Implementations§
impl Freeze for NumericResult
impl RefUnwindSafe for NumericResult
impl Send for NumericResult
impl Sync for NumericResult
impl Unpin for NumericResult
impl UnsafeUnpin for NumericResult
impl UnwindSafe for NumericResult
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