pub enum PortState {
Unconnected,
Connected,
Disconnected,
Closed,
}Expand description
A port’s possible states (either unconnected, connected, disconnected, or closed).
Variants§
Implementations§
Source§impl PortState
impl PortState
Sourcepub fn is_unconnected(&self) -> bool
pub fn is_unconnected(&self) -> bool
Checks whether the port state is currently unconnected.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Checks whether the port state is currently connected.
Sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
Checks whether the port state is currently disconnected.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl<T> Into<PortState> for &InputPortState<T>
impl<T> Into<PortState> for &InputPortState<T>
Source§impl<T> Into<PortState> for &OutputPortState<T>
impl<T> Into<PortState> for &OutputPortState<T>
Source§impl Ord for PortState
impl Ord for PortState
Source§impl PartialOrd for PortState
impl PartialOrd for PortState
impl Copy for PortState
impl Eq for PortState
impl StructuralPartialEq for PortState
Auto Trait Implementations§
impl Freeze for PortState
impl RefUnwindSafe for PortState
impl Send for PortState
impl Sync for PortState
impl Unpin for PortState
impl UnwindSafe for PortState
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