catlog::validate

Trait Validate

Source
pub trait Validate {
    type ValidationError;

    // Required method
    fn validate(&self) -> Result<(), NonEmpty<Self::ValidationError>>;
}
Expand description

An object that can validate itself.

Such an object is either valid, a state which carries no additional information, or is invalid, a state described by a nonempty list of validation errors.

Required Associated Types§

Source

type ValidationError

The type of a validation error.

This type should usually implement std::error::Error, though that is not required.

Required Methods§

Source

fn validate(&self) -> Result<(), NonEmpty<Self::ValidationError>>

Validates the object.

Implementors§

Source§

impl Validate for SkelGraph

Source§

impl<C: FgCategory + Validate> Validate for DiscreteDblTheory<C>

Source§

impl<DomId, CodId, Cat> Validate for DiscreteDblModelMorphism<'_, DomId, CodId, Cat>
where DomId: Eq + Clone + Hash, CodId: Eq + Clone + Hash, Cat: FgCategory, Cat::Ob: Hash, Cat::Mor: Hash,

Source§

impl<Id, Cat> Validate for DiscreteDblModel<Id, Cat>
where Id: Eq + Clone + Hash, Cat: FgCategory, Cat::Ob: Hash, Cat::Mor: Hash,

Source§

impl<Id, ThId, S> Validate for DiscreteTabModel<Id, ThId, S>
where Id: Eq + Clone + Hash, ThId: Eq + Clone + Hash, S: BuildHasher,

Source§

impl<Map, Dom, Cod> Validate for GraphMorphism<'_, Map, Dom, Cod>
where Map: GraphMapping, Map::DomE: Clone, Dom: FinGraph<V = Map::DomV, E = Map::DomE>, Cod: Graph<V = Map::CodV, E = Map::CodE>,

Source§

impl<Map, Dom, Cod> Validate for Function<'_, Map, Dom, Cod>
where Map: Mapping, Dom: FinSet<Elem = Map::Dom>, Cod: Set<Elem = Map::Cod>,

Source§

impl<V, E, EqKey, S> Validate for FpCategory<V, E, EqKey, S>
where V: Eq + Clone + Hash, E: Eq + Clone + Hash, EqKey: Eq + Clone + Hash, S: BuildHasher,

Source§

impl<V, E, S> Validate for FinCategory<V, E, S>
where V: Eq + Hash + Clone, E: Eq + Hash + Clone, S: BuildHasher,

Source§

impl<V, E, S> Validate for HashGraph<V, E, S>
where V: Eq + Hash + Clone, E: Eq + Hash + Clone, S: BuildHasher,