flowcore 1.0.0

Structures shared between runtime and clients
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::errors::Result;

/// The `Validate` trait used to check the elements deserialized from file obey all constraints
///
/// Some constraints cannot be expressed in the struct definition in `serde`
pub trait Validate {
    /// Validate that a deserialized model data structure is valid for use
    ///
    /// # Errors
    ///
    /// Will return `Err` if the value is not valid for this type
    fn validate(&self) -> Result<()>;
}