Trait hugr_core::ops::dataflow::DataflowOpTrait

source ·
pub trait DataflowOpTrait {
    const TAG: OpTag;

    // Required methods
    fn description(&self) -> &str;
    fn signature(&self) -> Signature;

    // 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) -> Signature

The signature of the operation.

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl DataflowOpTrait for CustomOp

source§

const TAG: OpTag = OpTag::Leaf

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 Lift

source§

const TAG: OpTag = OpTag::Leaf

source§

impl DataflowOpTrait for MakeTuple

source§

const TAG: OpTag = OpTag::Leaf

source§

impl DataflowOpTrait for Noop

source§

const TAG: OpTag = OpTag::Leaf

source§

impl DataflowOpTrait for Tag

source§

const TAG: OpTag = OpTag::Leaf

source§

impl DataflowOpTrait for UnpackTuple

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