diff options
Diffstat (limited to 'src/blocking.rs')
-rw-r--r-- | src/blocking.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/blocking.rs b/src/blocking.rs index 7e9a92b..2ac66e9 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -13,6 +13,13 @@ pub use crate::tunnel; #[derive(Debug)] pub struct Connection(crate::Connection); +impl Connection { + /// Creates a new blocking wrapper around [`crate::Connection`]. + pub fn new() -> crate::Result<Self> { + Ok(Self(crate::Connection::new()?)) + } +} + macro_rules! blockify { ($blk:ident) => { pub fn $blk(&self) -> crate::Result<()> { |