pub struct HistoryEntry {
pub input: String,
pub result: Option<f64>,
pub error_message: Option<String>,
}
Expand description
Represents a history entry for a mathematical expression and its result.
§Fields
input
: A string containing the original mathematical expression provided by the user.result
: An optional floating-point number (Option<f64>
) representing the calculated result.error_message
: An optional string (Option<String>
) containing an error message if the calculation failed.None
if there was no error.
This struct is used to log the history of calculations performed by the calculator.
Fields§
§input: String
§result: Option<f64>
§error_message: Option<String>
Trait Implementations§
Source§impl Clone for HistoryEntry
impl Clone for HistoryEntry
Source§fn clone(&self) -> HistoryEntry
fn clone(&self) -> HistoryEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HistoryEntry
impl RefUnwindSafe for HistoryEntry
impl Send for HistoryEntry
impl Sync for HistoryEntry
impl Unpin for HistoryEntry
impl UnwindSafe for HistoryEntry
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