MultiView

Trait MultiView 

Source
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§

Return the subport linked to the given port. If the port is not connected, return None.

Source

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.

Source

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§

Source

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.

Source

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.

Implementations on Foreign Types§

Source§

impl<G: MultiView> MultiView for &G

Source§

fn subports( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone

Source§

fn all_subports( &self, node: NodeIndex, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone

Source§

impl<G: MultiView> MultiView for &mut G

Source§

fn subports( &self, node: NodeIndex, direction: Direction, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone

Source§

fn all_subports( &self, node: NodeIndex, ) -> impl Iterator<Item = Self::LinkEndpoint> + Clone

Implementors§

Source§

impl<G> MultiView for FlatRegion<'_, G>
where G: MultiView + Clone,

Source§

impl<G> MultiView for Region<'_, G>
where G: MultiView + Clone,

Source§

impl<G, Ctx> MultiView for FilteredGraph<G, NodeFilter<Ctx>, LinkFilter<Ctx>, Ctx>
where G: MultiView + Clone,

Source§

impl<G: MultiView> MultiView for Subgraph<G>

Source§

impl<PO: Unsigned> MultiView for MultiPortGraph<u32, u32, PO>