pub trait MaterialFactory: Send + Sync {
// Required method
fn build(
&self,
params: &MaterialArgs,
input_types: &[ValueType],
) -> Result<MaterialBuild, String>;
// Provided methods
fn numeric_descriptor(
&self,
_params: &MaterialArgs,
_input_types: &[ValueType],
) -> Result<Option<NumericDescriptor>, String> { ... }
fn params(&self) -> &[ParamSpec] { ... }
fn update_trigger(
&self,
_params: &MaterialArgs,
_input_types: &[ValueType],
) -> Result<MaterialUpdateTrigger, String> { ... }
}Required Methods§
fn build( &self, params: &MaterialArgs, input_types: &[ValueType], ) -> Result<MaterialBuild, String>
Provided Methods§
Sourcefn numeric_descriptor(
&self,
_params: &MaterialArgs,
_input_types: &[ValueType],
) -> Result<Option<NumericDescriptor>, String>
fn numeric_descriptor( &self, _params: &MaterialArgs, _input_types: &[ValueType], ) -> Result<Option<NumericDescriptor>, String>
Describe an implemented strict numeric contract without allocating evaluator state.
fn params(&self) -> &[ParamSpec]
fn update_trigger( &self, _params: &MaterialArgs, _input_types: &[ValueType], ) -> Result<MaterialUpdateTrigger, String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".