pub struct TruthTable {
pub variables: Vec<char>,
pub rows: Vec<TruthTableRow>,
}Expand description
Represents the complete truth table for a given expression, with all possible value combinations and their corresponding results.
Fields§
§variables: Vec<char>A sorted list of unique variables.
rows: Vec<TruthTableRow>A Vec of all TruthTableRows, representing the table’s body.
Trait Implementations§
Source§impl Debug for TruthTable
impl Debug for TruthTable
Source§impl Display for TruthTable
impl Display for TruthTable
Source§impl From<&Expression> for TruthTable
impl From<&Expression> for TruthTable
Source§fn from(expression: &Expression) -> Self
fn from(expression: &Expression) -> Self
Creates a TruthTable.
It generates a truth table for a given logical expression showing the evaluation result for all possible combinations of its input variables.
§Arguments
expression- An AST node that represents a parsed logical expression.
Auto Trait Implementations§
impl Freeze for TruthTable
impl RefUnwindSafe for TruthTable
impl Send for TruthTable
impl Sync for TruthTable
impl Unpin for TruthTable
impl UnwindSafe for TruthTable
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