Trait hydroflow::scheduled::handoff::handoff_list::PortList

source ·
pub trait PortList<S>: Variadic + Sealed<S>
where S: Polarity,
{ type Ctx<'a>: Variadic; // Required methods fn set_graph_meta( &self, handoffs: &mut [HandoffData], out_handoff_ids: &mut Vec<HandoffId>, sg_id: SubgraphId, handoffs_are_preds: bool, ); fn make_ctx<'a>(&self, handoffs: &'a [HandoffData]) -> Self::Ctx<'a>; }
Expand description

Sealed trait for variadic lists of ports.

See the [variadics] crate for the strategy we use to implement variadics in Rust.

Required Associated Types§

source

type Ctx<'a>: Variadic

The [Variadic] return type of Self::make_ctx.

Required Methods§

source

fn set_graph_meta( &self, handoffs: &mut [HandoffData], out_handoff_ids: &mut Vec<HandoffId>, sg_id: SubgraphId, handoffs_are_preds: bool, )

Iteratively/recursively set the graph metadata for each port in this list.

Specifically sets:

  • HandoffData::preds and HandoffData::succs in the handoffs slice for the handoffs in this PortList (using pred and/or succ).
  • out_handoff_ids will be extended with all the handoff IDs in this PortList.

handoffs_are_preds:

  • true: Handoffs are predecessors (inputs) to subgraph sg_id.
  • false: Handoffs are successors (outputs) from subgraph sg_id.
source

fn make_ctx<'a>(&self, handoffs: &'a [HandoffData]) -> Self::Ctx<'a>

Iteratively/recursively construct a Ctx variadic list.

(Note that unlike Self::set_graph_meta, this does not mess with pred/succ handoffs for teeing).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<S> PortList<S> for ()
where S: Polarity,

source§

fn set_graph_meta( &self, _handoffs: &mut [HandoffData], _out_handoff_ids: &mut Vec<HandoffId>, _sg_id: SubgraphId, _handoffs_are_preds: bool, )

source§

type Ctx<'a> = ()

source§

fn make_ctx<'a>(&self, _handoffs: &'a [HandoffData]) -> Self::Ctx<'a>

source§

impl<S, Rest, H> PortList<S> for (Port<S, H>, Rest)
where S: Polarity, H: Handoff, Rest: PortList<S>,

source§

fn set_graph_meta( &self, handoffs: &mut [HandoffData], out_handoff_ids: &mut Vec<HandoffId>, sg_id: SubgraphId, handoffs_are_preds: bool, )

source§

type Ctx<'a> = (&'a PortCtx<S, H>, <Rest as PortList<S>>::Ctx<'a>)

source§

fn make_ctx<'a>(&self, handoffs: &'a [HandoffData]) -> Self::Ctx<'a>

Implementors§