Skip to main content

made_core/value_objects/
validation_passed.rs

1use serde::{Deserialize, Serialize};
2
3/// Whether the selected council decision passed its requested validation.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
5#[serde(transparent)]
6pub struct ValidationPassed(bool);
7
8impl ValidationPassed {
9    #[must_use]
10    pub const fn new(passed: bool) -> Self {
11        Self(passed)
12    }
13
14    #[must_use]
15    pub const fn get(self) -> bool {
16        self.0
17    }
18}