[−][src]Module verify::serde
This is supported on
feature="serde"
only.This module contains tools to make Serde Serializable values being able to be validated.
Spanned implements Validate and wraps a value that implements Serde Serialize allowing it to be validated by a Validator.
Spans is used to provide spans for values during validation.
An example validation:
ⓘThis example is not tested
let value = SerializableValue::new(); let validator = SomeValidator::new(); let result = Spanned::new(&value, KeySpans::default()).validate(&validator);
Or using Verifier:
ⓘThis example is not tested
let value = SerializableValue::new(); let validator = SomeValidator::new(); let result = validator.verify_value(&Spanned::new(&value, KeySpans::default());
Structs
KeySpans | feature="serde" KeySpans associates nested values with their full path from the first value as a Vec of Strings. |
Spanned | feature="serde" Spanned allows validation of any value that implements Serde Serialize with a given Spans. |
Traits
Spans | feature="serde" Spans is used to provide spans for values that implement Serde Serialize. |