Skip to main content

Operation

Trait Operation 

pub trait Operation<R>:
    Send
    + Sync
    + Debug
where 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>

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

Implementors§

§

impl<B> Operation<<B as FusionBackend>::FusionRuntime> for NoOp<B>
where B: FusionBackend,