aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-11-18 12:42:12 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-11-18 12:42:12 +0100
commit4c1b3e1f637ce7cb0825ea1e00eb492888777d00 (patch)
tree40d0a4c377babfcac31996e7515bc81f74e40f31
parentd19fda8ff4003113c9760189808293594f856a91 (diff)
add blocking connection constructor0.4.1
-rw-r--r--Cargo.toml2
-rw-r--r--src/blocking.rs7
2 files changed, 8 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index c0218ad..4a41b1a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rsdsl_netlinklib"
-version = "0.4.0"
+version = "0.4.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
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<()> {