pub trait MultiView: LinkView {
// Required methods
fn subport_link(
&self,
subport: Self::LinkEndpoint,
) -> Option<Self::LinkEndpoint>;
fn subports(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone;
fn all_subports(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone;
// Provided methods
fn subport_inputs(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone { ... }
fn subport_outputs(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone { ... }
}Expand description
Abstraction over a portgraph that may have multiple connections per node.
Required Methods§
Sourcefn subport_link(
&self,
subport: Self::LinkEndpoint,
) -> Option<Self::LinkEndpoint>
fn subport_link( &self, subport: Self::LinkEndpoint, ) -> Option<Self::LinkEndpoint>
Return the subport linked to the given port. If the port is not
connected, return None.
Sourcefn subports(
&self,
node: NodeIndex,
direction: Direction,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
fn subports( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
Iterates over all the subports of the node in the given direction.
Sourcefn all_subports(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
fn all_subports( &self, node: NodeIndex, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
Iterates over the input and output subports of the node in sequence.
Provided Methods§
Sourcefn subport_inputs(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
fn subport_inputs( &self, node: NodeIndex, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
Iterates over all the input subports of the node.
Shorthand for MultiView::subports.
Sourcefn subport_outputs(
&self,
node: NodeIndex,
) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
fn subport_outputs( &self, node: NodeIndex, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone
Iterates over all the output subports of the node.
Shorthand for MultiView::subports.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.