Skip to main content

MaterialFactory

Trait MaterialFactory 

Source
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§

Source

fn build( &self, params: &MaterialArgs, input_types: &[ValueType], ) -> Result<MaterialBuild, String>

Provided Methods§

Source

fn numeric_descriptor( &self, _params: &MaterialArgs, _input_types: &[ValueType], ) -> Result<Option<NumericDescriptor>, String>

Describe an implemented strict numeric contract without allocating evaluator state.

Source

fn params(&self) -> &[ParamSpec]

Source

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".

Implementors§