pub struct PortId { /* private fields */ }Expand description
Unique identifier for a port within a graph
Implementations§
Source§impl PortId
impl PortId
Sourcepub const fn new(
node: NodeId,
port_type: PortType,
direction: PortDirection,
index: u16,
) -> PortId
pub const fn new( node: NodeId, port_type: PortType, direction: PortDirection, index: u16, ) -> PortId
Create a new port ID
Sourcepub const fn control_in(node: NodeId, index: u16) -> PortId
pub const fn control_in(node: NodeId, index: u16) -> PortId
Create a new control input port
Sourcepub const fn control_out(node: NodeId, index: u16) -> PortId
pub const fn control_out(node: NodeId, index: u16) -> PortId
Create a new control output port
Sourcepub const fn feedback_in(node: NodeId, index: u16) -> PortId
pub const fn feedback_in(node: NodeId, index: u16) -> PortId
Create a new feedback input port
Sourcepub const fn feedback_out(node: NodeId, index: u16) -> PortId
pub const fn feedback_out(node: NodeId, index: u16) -> PortId
Create a new feedback output port
Sourcepub const fn param(node: NodeId, index: u16) -> PortId
pub const fn param(node: NodeId, index: u16) -> PortId
Create a new parameter port (always input)
Sourcepub const fn direction(&self) -> PortDirection
pub const fn direction(&self) -> PortDirection
Get the port direction
Sourcepub const fn is_control(&self) -> bool
pub const fn is_control(&self) -> bool
Check if this is a control port
Sourcepub const fn is_feedback(&self) -> bool
pub const fn is_feedback(&self) -> bool
Check if this is a feedback port
Trait Implementations§
impl Copy for PortId
impl Eq for PortId
impl StructuralPartialEq for PortId
Auto Trait Implementations§
impl Freeze for PortId
impl RefUnwindSafe for PortId
impl Send for PortId
impl Sync for PortId
impl Unpin for PortId
impl UnsafeUnpin for PortId
impl UnwindSafe for PortId
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