pub struct Value {
pub number: Option<BigRational>,
pub meaning: Meaning,
pub variable: Option<String>,
pub comment: Option<String>,
}Fields§
§number: Option<BigRational>§meaning: Meaning§variable: Option<String>§comment: Option<String>Implementations§
Source§impl Value
impl Value
pub const fn new(number: Option<BigRational>) -> Self
pub fn with_meaning(self, meaning: Meaning) -> Self
pub fn set_meaning(&mut self, meaning: Meaning)
pub fn with_variable(self, variable: &str) -> Self
pub fn set_variable(&mut self, variable: &str)
pub fn with_comment(self, comment: &str) -> Self
pub fn set_comment(&mut self, comment: &str)
pub fn from_string(number: &str) -> MyResult<Self>
pub fn to_strings(&self, context: &Context) -> ValueTuple
pub fn measure_hexadecimal(&self) -> usize
pub fn apply_meaning(&self, meaning: Meaning) -> MyResult<ValueRef>
pub fn calc_add(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_sub(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_mul(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_div(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_mod(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_neg(value: ValueRef) -> MyResult<ValueRef>
pub fn calc_inv(value: ValueRef) -> MyResult<ValueRef>
pub fn calc_pow(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_sqrt(value: ValueRef) -> MyResult<ValueRef>
pub fn calc_sum(values: Vec<ValueRef>) -> MyResult<ValueRef>
pub fn calc_prod(values: Vec<ValueRef>) -> MyResult<ValueRef>
pub fn calc_seq(start: ValueRef, stop: ValueRef) -> MyResult<Vec<ValueRef>>
pub fn calc_step( start: ValueRef, step: ValueRef, stop: ValueRef, ) -> MyResult<Vec<ValueRef>>
pub fn sort_seq(values: Vec<ValueRef>) -> MyResult<Vec<ValueRef>>
pub fn rev_seq(values: Vec<ValueRef>) -> MyResult<Vec<ValueRef>>
pub fn calc_and(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_or(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_xor(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_shl(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_shr(lhs: ValueRef, rhs: ValueRef) -> MyResult<ValueRef>
pub fn calc_now(time: &Option<SystemTime>) -> MyResult<ValueRef>
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more