diff --git a/src/common.rs b/src/common.rs index 9b96d11052a9f93b869515d8e3a79e6a83a8af15..698ac11837209e13af4a196cc69036d1c85e89e6 100644 --- a/src/common.rs +++ b/src/common.rs @@ -1,7 +1,7 @@ ///////////////////// PRELUDE ///////////////////// pub use crate::protocol::{ComponentState, ProtocolDescription}; -pub use crate::runtime::{NonsyncContext, SyncContext}; +pub use crate::runtime::{NonsyncProtoContext, SyncProtoContext}; pub use core::{ cmp::Ordering, @@ -140,3 +140,13 @@ impl Debug for PortId { write!(f, "PortId({},{})", self.controller_id, self.port_index) } } +impl std::ops::Not for Polarity { + type Output = Self; + fn not(self) -> Self::Output { + use Polarity::*; + match self { + Putter => Getter, + Getter => Putter, + } + } +}