pub trait OpTrait {
// Required methods
fn description(&self) -> &str;
fn tag(&self) -> OpTag;
// Provided methods
fn dataflow_signature(&self) -> Option<Signature> { ... }
fn extension_delta(&self) -> ExtensionSet { ... }
fn other_input(&self) -> Option<EdgeKind> { ... }
fn other_output(&self) -> Option<EdgeKind> { ... }
fn static_input(&self) -> Option<EdgeKind> { ... }
fn static_output(&self) -> Option<EdgeKind> { ... }
fn non_df_port_count(&self, dir: Direction) -> usize { ... }
}
Expand description
Trait implemented by all OpType variants.
Required Methods§
sourcefn description(&self) -> &str
fn description(&self) -> &str
A human-readable description of the operation.
Provided Methods§
sourcefn dataflow_signature(&self) -> Option<Signature>
fn dataflow_signature(&self) -> Option<Signature>
The signature of the operation.
Only dataflow operations have a signature, otherwise returns None.
sourcefn extension_delta(&self) -> ExtensionSet
fn extension_delta(&self) -> ExtensionSet
The delta between the input extensions specified for a node, and the output extensions calculated for that node
sourcefn other_input(&self) -> Option<EdgeKind>
fn other_input(&self) -> Option<EdgeKind>
The edge kind for the non-dataflow inputs of the operation, not described by the signature.
If not None, a single extra input port of that kind will be present.
sourcefn other_output(&self) -> Option<EdgeKind>
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 port of that kind will be present.
sourcefn static_input(&self) -> Option<EdgeKind>
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 OpTrait::other_input
ports.
sourcefn static_output(&self) -> Option<EdgeKind>
fn static_output(&self) -> Option<EdgeKind>
The edge kind for a single constant output of the operation, not described by the dataflow signature.
If not None, an extra output port of that kind will be present after the
dataflow input ports and before any OpTrait::other_output
ports.
sourcefn non_df_port_count(&self, dir: Direction) -> usize
fn non_df_port_count(&self, dir: Direction) -> usize
Get the number of non-dataflow multiports.