Trait protoflow_core::Port

source ·
pub trait Port {
    // Required methods
    fn id(&self) -> Option<PortID>;
    fn state(&self) -> PortState;

    // Provided methods
    fn name(&self) -> Option<&str> { ... }
    fn label(&self) -> Option<&str> { ... }
    fn is_closed(&self) -> bool { ... }
    fn is_open(&self) -> bool { ... }
    fn is_connected(&self) -> bool { ... }
}
Expand description

The common interface for ports, whether for input or output.

Required Methods§

source

fn id(&self) -> Option<PortID>

A unique identifier for this port.

source

fn state(&self) -> PortState

The current state of this port.

Provided Methods§

source

fn name(&self) -> Option<&str>

The machine-readable name of this port.

source

fn label(&self) -> Option<&str>

A human-readable label for this port.

source

fn is_closed(&self) -> bool

Checks whether this port is currently closed.

source

fn is_open(&self) -> bool

Checks whether this port is currently open.

source

fn is_connected(&self) -> bool

Checks whether this port is currently connected.

Implementors§