pub trait NDPluginProcess: Send + 'static {
// Required methods
fn process_array(
&mut self,
array: &NDArray,
pool: &NDArrayPool,
) -> ProcessResult;
fn plugin_type(&self) -> &str;
// Provided methods
fn compression_aware(&self) -> bool { ... }
fn register_params(
&mut self,
_base: &mut PortDriverBase,
) -> Result<(), AsynError> { ... }
fn on_param_change(
&mut self,
_reason: usize,
_params: &PluginParamSnapshot,
) -> ParamChangeResult { ... }
fn array_data_handle(&self) -> Option<Arc<Mutex<Option<Arc<NDArray>>>>> { ... }
}Expand description
Pure processing logic. No threading concerns.
Required Methods§
Sourcefn process_array(
&mut self,
array: &NDArray,
pool: &NDArrayPool,
) -> ProcessResult
fn process_array( &mut self, array: &NDArray, pool: &NDArrayPool, ) -> ProcessResult
Process one array. Return output arrays and param updates.
Sourcefn plugin_type(&self) -> &str
fn plugin_type(&self) -> &str
Plugin type name for PLUGIN_TYPE param.
Provided Methods§
Sourcefn compression_aware(&self) -> bool
fn compression_aware(&self) -> bool
Whether this plugin can process compressed (codec != None) arrays
(C++ compressionAware_, G3). Defaults to false: a plugin that
operates on raw pixels must not be handed compressed bytes — the
runtime drops compressed input and counts it into DroppedArrays.
A codec/file plugin that understands compressed data overrides this.
Sourcefn register_params(
&mut self,
_base: &mut PortDriverBase,
) -> Result<(), AsynError>
fn register_params( &mut self, _base: &mut PortDriverBase, ) -> Result<(), AsynError>
Register plugin-specific params on the base. Called once during construction.
Sourcefn on_param_change(
&mut self,
_reason: usize,
_params: &PluginParamSnapshot,
) -> ParamChangeResult
fn on_param_change( &mut self, _reason: usize, _params: &PluginParamSnapshot, ) -> ParamChangeResult
Called when a param changes. Reason is the param index. Return param updates to be written back to the port driver.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".