async_graphql

Trait CustomValidator

source
pub trait CustomValidator<T: InputType> {
    // Required method
    fn check(&self, value: &T) -> Result<(), InputValueError<T>>;
}
Expand description

Represents a custom input value validator.

Required Methods§

source

fn check(&self, value: &T) -> Result<(), InputValueError<T>>

Check the value is valid.

Implementors§

source§

impl<T, F, E> CustomValidator<T> for F
where T: InputType, E: Into<InputValueError<T>>, F: Fn(&T) -> Result<(), E>,