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§
Sourcefn link_subports(
&mut self,
subport_from: Self::LinkEndpoint,
subport_to: Self::LinkEndpoint,
) -> Result<(), LinkError<Self::PortOffsetBase>>
fn link_subports( &mut self, subport_from: Self::LinkEndpoint, subport_to: Self::LinkEndpoint, ) -> Result<(), LinkError<Self::PortOffsetBase>>
Link an output subport to an input subport.
§Errors
- If
subport_fromorsubport_todoes not exist. - If
subport_aandsubport_bhave the same direction. - If
subport_fromorsubport_tois already linked.
Sourcefn unlink_subport(
&mut self,
subport: Self::LinkEndpoint,
) -> Option<Self::LinkEndpoint>
fn unlink_subport( &mut self, subport: Self::LinkEndpoint, ) -> Option<Self::LinkEndpoint>
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.