Trait DataflowOpTrait

Source
pub trait DataflowOpTrait: Sized {
    const TAG: OpTag;

    // Required methods
    fn description(&self) -> &str;
    fn signature(&self) -> Cow<'_, Signature>;
    fn substitute(&self, _subst: &Substitution<'_>) -> Self;

    // Provided methods
    fn other_input(&self) -> Option<EdgeKind> { ... }
    fn other_output(&self) -> Option<EdgeKind> { ... }
    fn static_input(&self) -> Option<EdgeKind> { ... }
}
Expand description

Trait implemented by all dataflow operations.

Required Associated Constants§

Source

const TAG: OpTag

Tag identifying the operation.

Required Methods§

Source

fn description(&self) -> &str

A human-readable description of the operation.

Source

fn signature(&self) -> Cow<'_, Signature>

The signature of the operation.

Source

fn substitute(&self, _subst: &Substitution<'_>) -> Self

Apply a type-level substitution to this OpType, i.e. replace type variables with new types.

Provided Methods§

Source

fn other_input(&self) -> Option<EdgeKind>

The edge kind for the non-dataflow or constant inputs of the operation, not described by the signature.

If not None, a single extra output multiport of that kind will be present.

Source

fn other_output(&self) -> Option<EdgeKind>

The edge kind for the non-dataflow outputs of the operation, not described by the signature.

If not None, a single extra output multiport of that kind will be present.

Source

fn static_input(&self) -> Option<EdgeKind>

The edge kind for a single constant input of the operation, not described by the dataflow signature.

If not None, an extra input port of that kind will be present after the dataflow input ports and before any DataflowOpTrait::other_input ports.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl DataflowOpTrait for CFG

Source§

const TAG: OpTag = OpTag::Cfg

Source§

impl DataflowOpTrait for Conditional

Source§

const TAG: OpTag = OpTag::Conditional

Source§

impl DataflowOpTrait for TailLoop

Source§

const TAG: OpTag = OpTag::TailLoop

Source§

impl DataflowOpTrait for ExtensionOp

Source§

const TAG: OpTag = OpTag::Leaf

Source§

impl DataflowOpTrait for OpaqueOp

Source§

const TAG: OpTag = OpTag::Leaf

Source§

impl DataflowOpTrait for Tag

Source§

const TAG: OpTag = OpTag::Leaf

Source§

impl DataflowOpTrait for Call

Source§

const TAG: OpTag = OpTag::FnCall

Source§

impl DataflowOpTrait for CallIndirect

Source§

const TAG: OpTag = OpTag::FnCall

Source§

impl DataflowOpTrait for DFG

Source§

const TAG: OpTag = OpTag::Dfg

Source§

impl DataflowOpTrait for Input

Source§

const TAG: OpTag = OpTag::Input

Source§

impl DataflowOpTrait for LoadConstant

Source§

const TAG: OpTag = OpTag::LoadConst

Source§

impl DataflowOpTrait for LoadFunction

Source§

const TAG: OpTag = OpTag::LoadFunc

Source§

impl DataflowOpTrait for Output

Source§

const TAG: OpTag = OpTag::Output