Skip to main content

CreateModelInput

Trait CreateModelInput 

Source
pub trait CreateModelInput<M> {
    // Required method
    fn sql_values(&self) -> Vec<SqlColumnValue>;

    // Provided method
    fn validate(&self) -> Result<(), CoolError> { ... }
}

Required Methods§

Provided Methods§

Source

fn validate(&self) -> Result<(), CoolError>

Run schema-derived validators (@length, @email, @regex, …) on the input. Default impl is a no-op for inputs without validators.

Implementors§