Validator

Trait Validator 

Source
pub trait Validator {
    // Required method
    fn validate(&self, name: &str, value: &JSONValue) -> Result<(), String>;

    // Provided method
    fn transform(&self, _: &str, value: &JSONValue) -> Result<JSONValue, String> { ... }
}

Required Methods§

Source

fn validate(&self, name: &str, value: &JSONValue) -> Result<(), String>

Provided Methods§

Source

fn transform(&self, _: &str, value: &JSONValue) -> Result<JSONValue, String>

Implementors§