Trait Operation
pub trait Operation<R>:
Send
+ Sync
+ Debugwhere
R: FusionRuntime,{
// Required method
fn execute(
&self,
handles: &mut HandleContainer<<R as FusionRuntime>::FusionHandle>,
) -> Result<(), ExecutionError>;
}Expand description
General trait to abstract how a single operation is executed.
Required Methods§
fn execute(
&self,
handles: &mut HandleContainer<<R as FusionRuntime>::FusionHandle>,
) -> Result<(), ExecutionError>
fn execute( &self, handles: &mut HandleContainer<<R as FusionRuntime>::FusionHandle>, ) -> Result<(), ExecutionError>
Execute the operation.
Reporting a failure claims everything this operation was going to write, exactly as a panic out of it would — the difference is only that an error carries its own type and backtrace, where a panic payload is a message. Prefer returning one.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".