IntoUpdateValidatorFunc

Trait IntoUpdateValidatorFunc 

Source
pub trait IntoUpdateValidatorFunc<Arg> {
    // Required method
    fn into_update_validator_fn(
        self,
    ) -> Box<dyn Fn(&UpdateInfo, &Payload) -> Result<(), Error> + Send>;
}
Expand description

Closures / functions which can be turned into update validation functions implement this trait

Required Methods§

Source

fn into_update_validator_fn( self, ) -> Box<dyn Fn(&UpdateInfo, &Payload) -> Result<(), Error> + Send>

Consume the closure/fn pointer and turn it into an update validator

Implementors§

Source§

impl<A, F> IntoUpdateValidatorFunc<A> for F
where A: FromJsonPayloadExt + Send, F: for<'a> Fn(&'a UpdateInfo, A) -> Result<(), Error> + Send + 'static,