We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7777200 commit 64fa8caCopy full SHA for 64fa8ca
src/expr.rs
@@ -708,6 +708,20 @@ impl PartialEq for Expression {
708
}
709
710
711
+impl std::str::FromStr for Expression {
712
+ type Err = crate::error::ParseError;
713
+
714
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
715
+ Expression::parse(s)
716
+ }
717
+}
718
719
+impl std::fmt::Display for Expression {
720
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
721
+ f.write_str(&self.original)
722
723
724
725
/// A propositional logic used to evaluate `Expression` instances.
726
///
727
/// An `Expression` consists of some predicates and the `any`, `all` and `not` operators. An
0 commit comments