diff --git a/src/runtime2/port.rs b/src/runtime2/port.rs index 43e9d40a5d743309ee20a44059ab0340b91f4ddd..25cd6b3d52b59af1fcb6f0f3969b210e9dbd363a 100644 --- a/src/runtime2/port.rs +++ b/src/runtime2/port.rs @@ -1,6 +1,6 @@ use super::global_store::ConnectorId; -#[derive(Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub(crate) struct PortIdLocal { pub index: u32, } @@ -26,22 +26,13 @@ pub enum PortKind { Getter, } -pub enum PortOwnership { - Unowned, // i.e. held by a native application - Owned, - InTransit, -} - /// Represents a port inside of the runtime. May be without owner if it is /// created by the application interfacing with the runtime, instead of being /// created by a connector. pub struct Port { - // Once created, these values are immutable pub self_id: PortIdLocal, pub peer_id: PortIdLocal, pub kind: PortKind, - // But this can be changed, but only by the connector that owns it - pub ownership: PortOwnership, pub owning_connector: ConnectorId, pub peer_connector: ConnectorId, // might be temporarily inconsistent while peer port is sent around in non-sync phase. }