pub trait Template: Send + Sync {
// Required methods
fn key(&self) -> &str;
fn human_name(&self) -> &str;
fn description(&self) -> &str;
fn supported_object_kinds(&self) -> ObjectKindsDesc;
fn parameters(&self) -> Vec<ParameterDesc>;
fn instantiate(
&self,
params: &Value,
) -> Result<Box<dyn CheckFunc>, TemplateError>;
}Expand description
A template for creating checks.
Required Methods§
Sourcefn human_name(&self) -> &str
fn human_name(&self) -> &str
Get the human-readable name.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get the template description.
Sourcefn supported_object_kinds(&self) -> ObjectKindsDesc
fn supported_object_kinds(&self) -> ObjectKindsDesc
Get the supported object kinds.
Sourcefn parameters(&self) -> Vec<ParameterDesc>
fn parameters(&self) -> Vec<ParameterDesc>
Get parameter descriptions.
Sourcefn instantiate(
&self,
params: &Value,
) -> Result<Box<dyn CheckFunc>, TemplateError>
fn instantiate( &self, params: &Value, ) -> Result<Box<dyn CheckFunc>, TemplateError>
Instantiate a check function with the given parameters.