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§
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 [HandoffData],
out_handoff_ids: &mut Vec<HandoffId>,
sg_id: SubgraphId,
handoffs_are_preds: bool,
)
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
andHandoffData::succs
in thehandoffs
slice for the handoffs in thisPortList
(usingpred
and/orsucc
).out_handoff_ids
will 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 [HandoffData]) -> Self::Ctx<'a>
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.