A object that can be validated
| 83 | |
| 84 | /// A object that can be validated |
| 85 | pub trait Validatable { |
| 86 | /// The possible errors from the validation. |
| 87 | type Error; |
| 88 | /// Validate oneself. |
| 89 | /// `used`: some of the tags used by other parts, which should be existed. |
| 90 | fn validate(&self, used: Option<&Vec<Label>>) -> std::result::Result<(), Self::Error>; |
| 91 | } |
| 92 | |
| 93 | /// A cell used for bucket and validations |
| 94 | #[derive(Default)] |