Skip to main content

made_core/value_objects/
support_decision.rs

1use serde::{Deserialize, Serialize};
2
3/// Semantic decision made about a claim and its cited evidence.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
5pub enum SupportDecision {
6    Supported,
7    Unsupported,
8}
9
10impl SupportDecision {
11    #[must_use]
12    pub const fn is_supported(self) -> bool {
13        matches!(self, Self::Supported)
14    }
15}
16
17impl From<bool> for SupportDecision {
18    fn from(supported: bool) -> Self {
19        if supported {
20            Self::Supported
21        } else {
22            Self::Unsupported
23        }
24    }
25}