diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-11-18 12:42:12 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-11-18 12:42:12 +0100 |
commit | 4c1b3e1f637ce7cb0825ea1e00eb492888777d00 (patch) | |
tree | 40d0a4c377babfcac31996e7515bc81f74e40f31 /src | |
parent | d19fda8ff4003113c9760189808293594f856a91 (diff) |
add blocking connection constructor0.4.1
Diffstat (limited to 'src')
-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<()> { |