pub fn custom_rule<F>( name: impl Into<Cow<'static, str>>, validate: F, ) -> CustomRule<F>where F: for<'a> Fn(RuleContext<'a>) -> Result<(), String> + Send + Sync + 'static,