Skip to main content

CodecRuntime

Trait CodecRuntime 

Source
pub trait CodecRuntime: Send + Sync {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn atomic_opset(&self) -> AtomicOpsetDecl;
    fn dispatch_atomic(
        &mut self,
        op_type: &str,
        inputs: &[(&str, &dyn SlotValue)],
        ctx: &mut RuntimeResourceRef<'_>,
    ) -> Result<DispatchResult, Self::Error>;
}
Expand description

Role trait for codec implementations.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Codec-impl-specific error type.

Required Methods§

Source

fn atomic_opset(&self) -> AtomicOpsetDecl

Atomic-op opset this impl owns.

Source

fn dispatch_atomic( &mut self, op_type: &str, inputs: &[(&str, &dyn SlotValue)], ctx: &mut RuntimeResourceRef<'_>, ) -> Result<DispatchResult, Self::Error>

Rust-dispatch entry point for atomic ops.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§