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§
Sourcefn target_version(&self) -> u32
fn target_version(&self) -> u32
Target schema version.
Sourcefn adapt(
&self,
node: &Node,
graph: &mut Graph,
) -> Result<AdaptResult, ConvertError>
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".