diff --git a/src/common.rs b/src/common.rs index 537487d427612edb0a78dec1f1462bfd040f1db5..08587130bf657da1b637756355705f7d25c40ad5 100644 --- a/src/common.rs +++ b/src/common.rs @@ -54,6 +54,17 @@ pub struct ComponentId(Id); // PUB because it can be returned by errors #[repr(transparent)] pub struct PortId(pub(crate) Id); +impl PortId { + // TODO: Remove concept of ComponentId and PortId in this file + #[deprecated] + pub fn new(port: u32) -> Self { + return PortId(Id{ + connector_id: u32::MAX, + u32_suffix: port, + }); + } +} + /// A safely aliasable heap-allocated payload of message bytes #[derive(Default, Eq, PartialEq, Clone, Ord, PartialOrd)] pub struct Payload(pub Arc>);