pub struct Value {
pub number: Option<BigRational>,
pub meaning: Meaning,
pub comment: Option<String>,
}Fields§
§number: Option<BigRational>§meaning: Meaning§comment: Option<String>Implementations§
source§impl Value
impl Value
pub const fn new(number: Option<BigRational>) -> Value
pub fn with_meaning(self, meaning: Meaning) -> Value
pub fn with_comment(self, comment: &str) -> Value
pub fn from_string(context: &Context, number: &str) -> MyResult<Value>
pub fn to_strings(&self, context: &Context) -> (String, String, Option<String>)
pub fn measure_hexadecimal(&self) -> usize
pub fn calc_add(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_sub(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_mul(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_div(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_mod(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_neg(value: Value) -> MyResult<Value>
pub fn calc_inv(value: Value) -> MyResult<Value>
pub fn calc_pow(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_sqrt(value: Value) -> MyResult<Value>
pub fn calc_sum(values: Vec<Value>) -> MyResult<Value>
pub fn calc_prod(values: Vec<Value>) -> MyResult<Value>
pub fn calc_and(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_or(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_xor(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_shl(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_shr(lhs: Value, rhs: Value) -> MyResult<Value>
pub fn calc_now() -> MyResult<Value>
pub fn cast_plain(value: Value) -> MyResult<Value>
pub fn cast_delta(value: Value) -> MyResult<Value>
pub fn cast_time(value: Value) -> MyResult<Value>
Trait Implementations§
source§impl PartialEq for Value
impl PartialEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.