1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use crate::Formula;
#[derive(Debug)]
pub enum Error {}
impl std::fmt::Display for Error {
fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
unreachable!("No variants exist for literals::Error")
}
}
impl std::error::Error for Error {}
pub struct True;
impl<T> Formula<T> for True {
type Error = Error;
fn satisfied_by(&self, _value: &T) -> Result<bool, Self::Error> {
Ok(true)
}
}
pub struct False;
impl<T> Formula<T> for False {
type Error = Error;
fn satisfied_by(&self, _value: &T) -> Result<bool, Self::Error> {
Ok(false)
}
}