MultiMut

Trait MultiMut 

Source
pub trait MultiMut: MultiView + LinkMut {
    // Required methods
    fn link_subports(
        &mut self,
        subport_from: Self::LinkEndpoint,
        subport_to: Self::LinkEndpoint,
    ) -> Result<(), LinkError<Self::PortOffsetBase>>;
    fn unlink_subport(
        &mut self,
        subport: Self::LinkEndpoint,
    ) -> Option<Self::LinkEndpoint>;
}
Expand description

Abstraction for mutating a portgraph that may have multiple connections per node.

Required Methods§

Link an output subport to an input subport.

§Errors
  • If subport_from or subport_to does not exist.
  • If subport_a and subport_b have the same direction.
  • If subport_from or subport_to is already linked.

Unlinks the port and returns the subport it was linked to. Returns None when the port was not linked.

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: MultiMut> MultiMut for &mut G

Implementors§