Skip to main content

OpAdapter

Trait OpAdapter 

Source
pub trait OpAdapter: Send + Sync {
    // Required methods
    fn source(&self) -> (&str, &str, u32);
    fn target_version(&self) -> u32;
    fn adapt(
        &self,
        node: &Node,
        graph: &mut Graph,
    ) -> Result<AdaptResult, ConvertError>;
}
Expand description

Converts one operator from a source schema version to a target version.

Required Methods§

Source

fn source(&self) -> (&str, &str, u32)

Source (domain, op_type, version).

Source

fn target_version(&self) -> u32

Target schema version.

Source

fn adapt( &self, node: &Node, graph: &mut Graph, ) -> Result<AdaptResult, ConvertError>

Adapt node, optionally mutating it through graph.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§