pub struct MatchSummary {Show 13 fields
pub lhs: String,
pub rhs: String,
pub lhs_postfix: String,
pub rhs_postfix: String,
pub solve_for_x: Option<String>,
pub solve_for_x_postfix: Option<String>,
pub canonical_key: String,
pub x_value: f64,
pub error: f64,
pub complexity: u32,
pub operator_count: usize,
pub tree_depth: usize,
pub is_exact: bool,
}Expand description
Presentation-ready fields derived from a search Match.
Binding surfaces (WASM, Python) convert this into their own types with trivial field copies, keeping derived-field logic in one place.
Fields§
§lhs: StringLeft-hand side expression in infix notation
rhs: StringRight-hand side expression in infix notation
lhs_postfix: StringLeft-hand side expression in postfix notation
rhs_postfix: StringRight-hand side expression in postfix notation
solve_for_x: Option<String>Solved x = expression in infix notation, when analytically solvable
solve_for_x_postfix: Option<String>Solved x = expression in postfix notation
canonical_key: StringCanonical key for deduplication
x_value: f64Solved value of x
error: f64Error (x_value - target)
complexity: u32Complexity score
operator_count: usizeNumber of operators in the equation
tree_depth: usizeMaximum tree depth of the equation
is_exact: boolWhether this is an exact match
Implementations§
Source§impl MatchSummary
impl MatchSummary
Sourcepub fn from_match(m: &Match) -> Self
pub fn from_match(m: &Match) -> Self
Build presentation fields from a search match.
Trait Implementations§
Source§impl Clone for MatchSummary
impl Clone for MatchSummary
Source§fn clone(&self) -> MatchSummary
fn clone(&self) -> MatchSummary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MatchSummary
impl Debug for MatchSummary
Auto Trait Implementations§
impl Freeze for MatchSummary
impl RefUnwindSafe for MatchSummary
impl Send for MatchSummary
impl Sync for MatchSummary
impl Unpin for MatchSummary
impl UnsafeUnpin for MatchSummary
impl UnwindSafe for MatchSummary
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