pub trait PortList<S>: Variadic + Sealed<S>where
S: Polarity,{
type Ctx<'a>: Variadic;
// Required methods
fn set_graph_meta(
&self,
handoffs: &mut SlotVec<HandoffTag, HandoffData>,
out_handoff_ids: &mut Vec<HandoffId>,
sg_id: SubgraphId,
handoffs_are_preds: bool,
);
fn make_ctx<'a>(
&self,
handoffs: &'a SlotVec<HandoffTag, 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§
sourcetype Ctx<'a>: Variadic
type Ctx<'a>: Variadic
The [Variadic] return type of Self::make_ctx.
Required Methods§
sourcefn set_graph_meta(
&self,
handoffs: &mut SlotVec<HandoffTag, HandoffData>,
out_handoff_ids: &mut Vec<HandoffId>,
sg_id: SubgraphId,
handoffs_are_preds: bool,
)
fn set_graph_meta( &self, handoffs: &mut SlotVec<HandoffTag, 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::predsandHandoffData::succsin thehandoffsslice for the handoffs in thisPortList(usingpredand/orsucc).out_handoff_idswill be extended with all the handoff IDs in thisPortList.
handoffs_are_preds:
true: Handoffs are predecessors (inputs) to subgraphsg_id.false: Handoffs are successors (outputs) from subgraphsg_id.
sourcefn make_ctx<'a>(
&self,
handoffs: &'a SlotVec<HandoffTag, HandoffData>,
) -> Self::Ctx<'a>
fn make_ctx<'a>( &self, handoffs: &'a SlotVec<HandoffTag, 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.