pub trait CustomGenerator: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn generate(&self) -> Result<Value>;
// Provided methods
fn generate_with_params(
&self,
params: &HashMap<String, Value>,
) -> Result<Value> { ... }
fn validate_params(&self, params: &HashMap<String, Value>) -> Result<()> { ... }
fn param_schema(&self) -> HashMap<String, ParamType> { ... }
}Expand description
自定义生成器特征
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
生成器描述
Provided Methods§
Sourcefn param_schema(&self) -> HashMap<String, ParamType>
fn param_schema(&self) -> HashMap<String, ParamType>
获取参数模式