pub trait Validate:
Send
+ Sync
+ 'static {
// Required method
fn check(&self, value: &str) -> Result<(), String>;
}Expand description
Anything that can decide whether an input string is acceptable.
Implement this for any external validation library to bridge it into
the prompt’s .rule(...) chain.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".