pub struct Schematic<DATA> { /* private fields */ }
Implementations§
Source§impl<DATA> Schematic<DATA>where
DATA: Clone,
impl<DATA> Schematic<DATA>where
DATA: Clone,
pub fn new<T: Into<String>>( name: T, input_data: DATA, output_data: DATA, ) -> Self
pub fn name(&self) -> &str
pub fn input(&self) -> &Node<DATA>
pub fn output(&self) -> &Node<DATA>
pub fn inherent(&self) -> &Node<DATA>
pub fn connections(&self) -> &[Connection<DATA>]
pub fn get_port(&self, port: &PortReference) -> &NodePort
pub fn get_ports(&self) -> Vec<PortReference>
pub fn get_port_name(&self, port: &PortReference) -> &str
pub fn add_input<T: Into<String>>(&mut self, port: T) -> PortReference
pub fn add_output<T: Into<String>>(&mut self, port: T) -> PortReference
pub fn nodes(&self) -> &[Node<DATA>]
pub fn used_nodes(&self) -> Vec<&Node<DATA>>
pub fn get(&self, index: NodeIndex) -> Option<&Node<DATA>>
pub fn get_mut(&mut self, index: NodeIndex) -> Option<&mut Node<DATA>>
pub fn find(&self, name: &str) -> Option<&Node<DATA>>
pub fn find_mut(&mut self, name: &str) -> Option<&mut Node<DATA>>
pub fn get_port_connections(&self, port: &NodePort) -> Vec<&Connection<DATA>>
pub fn get_connections(&self) -> &[Connection<DATA>]
pub fn downstreams_from( &self, node: NodeIndex, ) -> Option<Vec<Connections<'_, DATA>>>
pub fn downstream_connections<T: AsRef<PortReference>>( &self, port: T, ) -> Option<Connections<'_, DATA>>
pub fn upstreams_from( &self, node: NodeIndex, ) -> Option<Vec<Connections<'_, DATA>>>
pub fn upstream_connections<T: AsRef<PortReference>>( &self, port: T, ) -> Option<Connections<'_, DATA>>
pub fn add_external<T: Into<String>>( &mut self, name: T, reference: NodeReference, data: DATA, ) -> NodeIndex
pub fn add_and_get_mut<T: Into<String>>( &mut self, name: T, reference: NodeReference, data: DATA, ) -> &mut Node<DATA>
pub fn add_inherent<T: Into<String>>( &mut self, name: T, reference: NodeReference, data: DATA, ) -> NodeIndex
pub fn connect( &mut self, from: PortReference, to: PortReference, data: DATA, ) -> Result<(), Error>
pub fn walker(&self) -> SchematicWalker<'_, DATA> ⓘ
pub fn walk_from_output(&self) -> SchematicWalker<'_, DATA> ⓘ
pub fn walk_from_port<T: AsRef<PortReference>>( &self, port: T, direction: WalkDirection, ) -> SchematicWalker<'_, DATA> ⓘ
pub fn render_dot(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl<DATA> Freeze for Schematic<DATA>
impl<DATA> RefUnwindSafe for Schematic<DATA>where
DATA: RefUnwindSafe,
impl<DATA> Send for Schematic<DATA>where
DATA: Send,
impl<DATA> Sync for Schematic<DATA>where
DATA: Sync,
impl<DATA> Unpin for Schematic<DATA>where
DATA: Unpin,
impl<DATA> UnwindSafe for Schematic<DATA>where
DATA: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more