diff --git a/crates/transport-ipc/src/connect.rs b/crates/transport-ipc/src/connect.rs index 1371aa64dcf..6857820e34b 100644 --- a/crates/transport-ipc/src/connect.rs +++ b/crates/transport-ipc/src/connect.rs @@ -9,6 +9,17 @@ pub struct IpcConnect { inner: T, } +impl IpcConnect { + /// Create a new IPC connection object for any type T that can be converted into + /// `IpcConnect`. + pub const fn new(inner: T) -> Self + where + Self: alloy_pubsub::PubSubConnect, + { + Self { inner } + } +} + macro_rules! impl_connect { ($target:ty) => { impl From<$target> for IpcConnect<$target> {