Type Alias openvet_storage::database::functions::Validator

source ·
pub type Validator = Arc<dyn Fn(&str) -> Result<(), Box<dyn Error + Send + Sync + 'static>> + Send + Sync + 'static>;
Expand description

Signature for a validation function, used to validate JSON.

Generally, these will use serde_json::from_str to decode the value into a given struct, but the validation could also be implemented in a different way.

Aliased Type§

struct Validator { /* private fields */ }