diff --git a/Cargo.lock b/Cargo.lock
index 3187bf25b..4b89e13e5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3738,7 +3738,7 @@ dependencies = [
[[package]]
name = "zenoh"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"ahash",
"async-trait",
@@ -3786,7 +3786,7 @@ dependencies = [
[[package]]
name = "zenoh-buffers"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"zenoh-collections",
]
@@ -3823,7 +3823,7 @@ dependencies = [
[[package]]
name = "zenoh-codec"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"tracing",
"uhlc",
@@ -3835,12 +3835,12 @@ dependencies = [
[[package]]
name = "zenoh-collections"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
[[package]]
name = "zenoh-config"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"json5",
"num_cpus",
@@ -3862,7 +3862,7 @@ dependencies = [
[[package]]
name = "zenoh-core"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"lazy_static",
"tokio",
@@ -3873,7 +3873,7 @@ dependencies = [
[[package]]
name = "zenoh-crypto"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"aes",
"hmac",
@@ -3886,7 +3886,7 @@ dependencies = [
[[package]]
name = "zenoh-ext"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"bincode",
@@ -3905,7 +3905,7 @@ dependencies = [
[[package]]
name = "zenoh-keyexpr"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"hashbrown 0.14.5",
"keyed-set",
@@ -3919,7 +3919,7 @@ dependencies = [
[[package]]
name = "zenoh-link"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"zenoh-config",
"zenoh-link-commons",
@@ -3939,7 +3939,7 @@ dependencies = [
[[package]]
name = "zenoh-link-commons"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"flume",
@@ -3963,7 +3963,7 @@ dependencies = [
[[package]]
name = "zenoh-link-quic"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -3990,7 +3990,7 @@ dependencies = [
[[package]]
name = "zenoh-link-serial"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"tokio",
@@ -4008,7 +4008,7 @@ dependencies = [
[[package]]
name = "zenoh-link-tcp"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"socket2 0.5.7",
@@ -4025,7 +4025,7 @@ dependencies = [
[[package]]
name = "zenoh-link-tls"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -4054,7 +4054,7 @@ dependencies = [
[[package]]
name = "zenoh-link-udp"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"socket2 0.5.7",
@@ -4073,7 +4073,7 @@ dependencies = [
[[package]]
name = "zenoh-link-unixpipe"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"advisory-lock",
"async-trait",
@@ -4095,7 +4095,7 @@ dependencies = [
[[package]]
name = "zenoh-link-unixsock_stream"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"nix 0.29.0",
@@ -4113,7 +4113,7 @@ dependencies = [
[[package]]
name = "zenoh-link-vsock"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"libc",
@@ -4131,7 +4131,7 @@ dependencies = [
[[package]]
name = "zenoh-link-ws"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"futures-util",
@@ -4151,7 +4151,7 @@ dependencies = [
[[package]]
name = "zenoh-macros"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"proc-macro2",
"quote",
@@ -4162,7 +4162,7 @@ dependencies = [
[[package]]
name = "zenoh-plugin-trait"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"git-version",
"libloading",
@@ -4178,7 +4178,7 @@ dependencies = [
[[package]]
name = "zenoh-protocol"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"const_format",
"rand",
@@ -4192,7 +4192,7 @@ dependencies = [
[[package]]
name = "zenoh-result"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"anyhow",
]
@@ -4200,7 +4200,7 @@ dependencies = [
[[package]]
name = "zenoh-runtime"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"lazy_static",
"ron",
@@ -4213,7 +4213,7 @@ dependencies = [
[[package]]
name = "zenoh-shm"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"advisory-lock",
"async-trait",
@@ -4236,7 +4236,7 @@ dependencies = [
[[package]]
name = "zenoh-sync"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"event-listener 5.3.1",
"futures",
@@ -4249,7 +4249,7 @@ dependencies = [
[[package]]
name = "zenoh-task"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"futures",
"tokio",
@@ -4262,7 +4262,7 @@ dependencies = [
[[package]]
name = "zenoh-transport"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"crossbeam-utils",
@@ -4296,7 +4296,7 @@ dependencies = [
[[package]]
name = "zenoh-util"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"const_format",
diff --git a/build-resources/opaque-types/Cargo.lock b/build-resources/opaque-types/Cargo.lock
index 01429e8c9..b447985ff 100644
--- a/build-resources/opaque-types/Cargo.lock
+++ b/build-resources/opaque-types/Cargo.lock
@@ -3131,7 +3131,7 @@ dependencies = [
[[package]]
name = "zenoh"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"ahash",
"async-trait",
@@ -3179,7 +3179,7 @@ dependencies = [
[[package]]
name = "zenoh-buffers"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"zenoh-collections",
]
@@ -3187,7 +3187,7 @@ dependencies = [
[[package]]
name = "zenoh-codec"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"tracing",
"uhlc",
@@ -3199,12 +3199,12 @@ dependencies = [
[[package]]
name = "zenoh-collections"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
[[package]]
name = "zenoh-config"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"json5",
"num_cpus",
@@ -3226,7 +3226,7 @@ dependencies = [
[[package]]
name = "zenoh-core"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"lazy_static",
"tokio",
@@ -3237,7 +3237,7 @@ dependencies = [
[[package]]
name = "zenoh-crypto"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"aes",
"hmac",
@@ -3250,7 +3250,7 @@ dependencies = [
[[package]]
name = "zenoh-ext"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"bincode",
@@ -3269,7 +3269,7 @@ dependencies = [
[[package]]
name = "zenoh-keyexpr"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"hashbrown",
"keyed-set",
@@ -3283,7 +3283,7 @@ dependencies = [
[[package]]
name = "zenoh-link"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"zenoh-config",
"zenoh-link-commons",
@@ -3303,7 +3303,7 @@ dependencies = [
[[package]]
name = "zenoh-link-commons"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"flume",
@@ -3327,7 +3327,7 @@ dependencies = [
[[package]]
name = "zenoh-link-quic"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -3354,7 +3354,7 @@ dependencies = [
[[package]]
name = "zenoh-link-serial"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"tokio",
@@ -3372,7 +3372,7 @@ dependencies = [
[[package]]
name = "zenoh-link-tcp"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"socket2",
@@ -3389,7 +3389,7 @@ dependencies = [
[[package]]
name = "zenoh-link-tls"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -3418,7 +3418,7 @@ dependencies = [
[[package]]
name = "zenoh-link-udp"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"socket2",
@@ -3437,7 +3437,7 @@ dependencies = [
[[package]]
name = "zenoh-link-unixpipe"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"advisory-lock",
"async-trait",
@@ -3459,7 +3459,7 @@ dependencies = [
[[package]]
name = "zenoh-link-unixsock_stream"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"nix 0.29.0",
@@ -3477,7 +3477,7 @@ dependencies = [
[[package]]
name = "zenoh-link-vsock"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"libc",
@@ -3495,7 +3495,7 @@ dependencies = [
[[package]]
name = "zenoh-link-ws"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"futures-util",
@@ -3515,7 +3515,7 @@ dependencies = [
[[package]]
name = "zenoh-macros"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"proc-macro2",
"quote",
@@ -3526,7 +3526,7 @@ dependencies = [
[[package]]
name = "zenoh-plugin-trait"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"git-version",
"libloading",
@@ -3542,7 +3542,7 @@ dependencies = [
[[package]]
name = "zenoh-protocol"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"const_format",
"rand",
@@ -3556,7 +3556,7 @@ dependencies = [
[[package]]
name = "zenoh-result"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"anyhow",
]
@@ -3564,7 +3564,7 @@ dependencies = [
[[package]]
name = "zenoh-runtime"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"lazy_static",
"ron",
@@ -3577,7 +3577,7 @@ dependencies = [
[[package]]
name = "zenoh-shm"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"advisory-lock",
"async-trait",
@@ -3600,7 +3600,7 @@ dependencies = [
[[package]]
name = "zenoh-sync"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"event-listener",
"futures",
@@ -3613,7 +3613,7 @@ dependencies = [
[[package]]
name = "zenoh-task"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"futures",
"tokio",
@@ -3626,7 +3626,7 @@ dependencies = [
[[package]]
name = "zenoh-transport"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"crossbeam-utils",
@@ -3660,7 +3660,7 @@ dependencies = [
[[package]]
name = "zenoh-util"
version = "1.0.0-dev"
-source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3744075e5afb10054165a6eac9f4c2fa0be240ac"
+source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a6bc509b5997c922a56253455149858af715edfa"
dependencies = [
"async-trait",
"const_format",
diff --git a/docs/api.rst b/docs/api.rst
index 7192bdf2c..0210b4920 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -227,9 +227,11 @@ Types
Functions
^^^^^^^^^
.. doxygenfunction:: z_reply_err_payload
+.. doxygenfunction:: z_reply_err_payload_mut
.. doxygenfunction:: z_reply_err_encoding
.. doxygenfunction:: z_reply_err_loan
+.. doxygenfunction:: z_reply_err_loan_mut
.. doxygenfunction:: z_reply_err_clone
.. doxygenfunction:: z_reply_err_drop
@@ -244,6 +246,7 @@ Types
Functions
^^^^^^^^^
.. doxygenfunction:: z_sample_loan
+.. doxygenfunction:: z_sample_loan_mut
.. doxygenfunction:: z_sample_drop
.. doxygenfunction:: z_sample_clone
@@ -251,6 +254,7 @@ Functions
.. doxygenfunction:: z_sample_attachment
.. doxygenfunction:: z_sample_encoding
.. doxygenfunction:: z_sample_payload
+.. doxygenfunction:: z_sample_payload_mut
.. doxygenfunction:: z_sample_priority
.. doxygenfunction:: z_sample_congestion_control
.. doxygenfunction:: z_sample_express
@@ -314,6 +318,8 @@ Functions
.. doxygenfunction:: z_bytes_writer_write_all
.. doxygenfunction:: z_bytes_writer_append
+.. doxygenfunction:: z_bytes_as_mut_loaned_shm
+
System
======
@@ -627,14 +633,17 @@ Functions
.. doxygenfunction:: z_queryable_drop
.. doxygenfunction:: z_query_loan
+.. doxygenfunction:: z_query_loan_mut
.. doxygenfunction:: z_query_drop
.. doxygenfunction:: z_query_clone
.. doxygenfunction:: z_query_keyexpr
.. doxygenfunction:: z_query_parameters
.. doxygenfunction:: z_query_payload
+.. doxygenfunction:: z_query_payload_mut
.. doxygenfunction:: z_query_encoding
.. doxygenfunction:: z_query_attachment
+.. doxygenfunction:: z_query_attachment_mut
.. doxygenfunction:: z_query_reply
.. doxygenfunction:: z_query_reply_err
.. doxygenfunction:: z_query_reply_del
@@ -721,9 +730,12 @@ Functions
.. doxygenfunction:: z_reply_drop
.. doxygenfunction:: z_reply_clone
.. doxygenfunction:: z_reply_loan
+.. doxygenfunction:: z_reply_loan_mut
.. doxygenfunction:: z_reply_is_ok
.. doxygenfunction:: z_reply_ok
+.. doxygenfunction:: z_reply_ok_mut
.. doxygenfunction:: z_reply_err
+.. doxygenfunction:: z_reply_err_mut
.. doxygenfunction:: z_closure_reply_call
.. doxygenfunction:: z_closure_reply_loan
diff --git a/examples/z_sub_shm.c b/examples/z_sub_shm.c
index c04ddbd22..548138c6b 100644
--- a/examples/z_sub_shm.c
+++ b/examples/z_sub_shm.c
@@ -44,9 +44,17 @@ void data_handler(z_loaned_sample_t *sample, void *arg) {
#if defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)
char *payload_type = "RAW";
{
- const z_loaned_shm_t *shm = NULL;
- if (z_bytes_as_loaned_shm(z_sample_payload(sample), &shm) == Z_OK) {
- payload_type = "SHM";
+ // try to convert sample payload into SHM buffer. The conversion will succeed
+ // only if payload is carrying underlying SHM buffer
+ z_loaned_shm_t *shm = NULL;
+ if (z_bytes_as_mut_loaned_shm(z_sample_payload_mut(sample), &shm) == Z_OK) {
+ // try to get mutable access to SHM buffer
+ z_loaned_shm_mut_t *shm_mut = z_shm_try_reloan_mut(shm);
+ if (shm_mut) {
+ payload_type = "SHM (MUT)";
+ } else {
+ payload_type = "SHM (IMMUT)";
+ }
}
}
#endif
diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h
index 8eec752cf..07e0f898f 100644
--- a/include/zenoh_commons.h
+++ b/include/zenoh_commons.h
@@ -1431,6 +1431,18 @@ ZENOHC_API
z_result_t z_bytes_as_loaned_shm(const struct z_loaned_bytes_t *this_,
const struct z_loaned_shm_t **dst);
#endif
+/**
+ * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
+ * @brief Converts data into a mutably loaned SHM buffer.
+ *
+ * @param this_: Data to convert.
+ * @param dst: An uninitialized memory location where to construct an SHM buffer.
+ */
+#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API))
+ZENOHC_API
+z_result_t z_bytes_as_mut_loaned_shm(struct z_loaned_bytes_t *this_,
+ struct z_loaned_shm_t **dst);
+#endif
/**
* Constructs an owned shallow copy of data in provided uninitialized memory location.
*/
@@ -1622,18 +1634,6 @@ ZENOHC_API int64_t z_bytes_reader_tell(struct z_bytes_reader_t *this_);
ZENOHC_API
bool z_bytes_slice_iterator_next(struct z_bytes_slice_iterator_t *this_,
struct z_view_slice_t *slice);
-/**
- * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
- * @brief Converts data into a mutably loaned SHM buffer.
- *
- * @param this_: Data to convert.
- * @param dst: An uninitialized memory location where to construct an SHM buffer.
- */
-#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API))
-ZENOHC_API
-z_result_t z_bytes_to_mut_loaned_shm(struct z_loaned_bytes_t *this_,
- struct z_loaned_shm_t **dst);
-#endif
/**
* @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
* @brief Converts data into an owned SHM buffer by copying it's shared reference.
@@ -3650,6 +3650,12 @@ void z_querier_options_default(struct z_querier_options_t *this_);
* Returns NULL if query does not contain an attachment.
*/
ZENOHC_API const struct z_loaned_bytes_t *z_query_attachment(const struct z_loaned_query_t *this_);
+/**
+ * Gets mutable query attachment.
+ *
+ * Returns NULL if query does not contain an attachment.
+ */
+ZENOHC_API struct z_loaned_bytes_t *z_query_attachment_mut(struct z_loaned_query_t *this_);
/**
* Constructs a shallow copy of the query, allowing to keep it in an "open" state past the callback's return.
*
@@ -3710,6 +3716,10 @@ ZENOHC_API const struct z_loaned_keyexpr_t *z_query_keyexpr(const struct z_loane
* Borrows the query.
*/
ZENOHC_API const struct z_loaned_query_t *z_query_loan(const struct z_owned_query_t *this_);
+/**
+ * Mutably borrows the query.
+ */
+ZENOHC_API struct z_loaned_query_t *z_query_loan_mut(struct z_owned_query_t *this_);
/**
* Gets query value selector.
*/
@@ -3723,6 +3733,13 @@ void z_query_parameters(const struct z_loaned_query_t *this_,
*/
ZENOHC_API
const struct z_loaned_bytes_t *z_query_payload(const struct z_loaned_query_t *this_);
+/**
+ * Gets mutable query payload.
+ *
+ * Returns NULL if query does not contain a payload.
+ */
+ZENOHC_API
+struct z_loaned_bytes_t *z_query_payload_mut(struct z_loaned_query_t *this_);
/**
* Sends a reply to a query.
*
@@ -3884,11 +3901,25 @@ const struct z_loaned_encoding_t *z_reply_err_encoding(const struct z_loaned_rep
*/
ZENOHC_API
const struct z_loaned_reply_err_t *z_reply_err_loan(const struct z_owned_reply_err_t *this_);
+/**
+ * Mutably borrows reply error.
+ */
+ZENOHC_API struct z_loaned_reply_err_t *z_reply_err_loan_mut(struct z_owned_reply_err_t *this_);
+/**
+ * Yields the contents of the reply by asserting it indicates a failure.
+ *
+ * Returns `NULL` if reply does not contain a error (i. e. if `z_reply_is_ok` returns ``true``).
+ */
+ZENOHC_API struct z_loaned_reply_err_t *z_reply_err_mut(struct z_loaned_reply_t *this_);
/**
* Returns reply error payload.
*/
ZENOHC_API
const struct z_loaned_bytes_t *z_reply_err_payload(const struct z_loaned_reply_err_t *this_);
+/**
+ * Returns mutable reply error payload.
+ */
+ZENOHC_API struct z_loaned_bytes_t *z_reply_err_payload_mut(struct z_loaned_reply_err_t *this_);
/**
* Returns ``true`` if reply contains a valid response, ``false`` otherwise (in this case it contains a errror value).
*/
@@ -3898,12 +3929,22 @@ bool z_reply_is_ok(const struct z_loaned_reply_t *this_);
* Borrows reply.
*/
ZENOHC_API const struct z_loaned_reply_t *z_reply_loan(const struct z_owned_reply_t *this_);
+/**
+ * Mutably borrows reply.
+ */
+ZENOHC_API struct z_loaned_reply_t *z_reply_loan_mut(struct z_owned_reply_t *this_);
/**
* Yields the contents of the reply by asserting it indicates a success.
*
* Returns `NULL` if reply does not contain a sample (i. e. if `z_reply_is_ok` returns ``false``).
*/
ZENOHC_API const struct z_loaned_sample_t *z_reply_ok(const struct z_loaned_reply_t *this_);
+/**
+ * Yields the contents of the reply by asserting it indicates a success.
+ *
+ * Returns `NULL` if reply does not contain a sample (i. e. if `z_reply_is_ok` returns ``false``).
+ */
+ZENOHC_API struct z_loaned_sample_t *z_reply_ok_mut(struct z_loaned_reply_t *this_);
/**
* @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
* @brief Gets the id of the zenoh instance that answered this Reply.
@@ -4053,10 +4094,18 @@ ZENOHC_API enum z_sample_kind_t z_sample_kind(const struct z_loaned_sample_t *th
* Borrows sample.
*/
ZENOHC_API const struct z_loaned_sample_t *z_sample_loan(const struct z_owned_sample_t *this_);
+/**
+ * Mutably borrows sample.
+ */
+ZENOHC_API struct z_loaned_sample_t *z_sample_loan_mut(struct z_owned_sample_t *this_);
/**
* Returns the sample payload data.
*/
ZENOHC_API const struct z_loaned_bytes_t *z_sample_payload(const struct z_loaned_sample_t *this_);
+/**
+ * Returns the mutable sample payload data.
+ */
+ZENOHC_API struct z_loaned_bytes_t *z_sample_payload_mut(struct z_loaned_sample_t *this_);
/**
* Returns sample qos priority value.
*/
@@ -4453,6 +4502,7 @@ struct z_loaned_shm_mut_t *z_shm_try_mut(struct z_owned_shm_t *this_);
/**
* @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
* @brief Tries to reborrow mutably-borrowed ZShm slice as borrowed ZShmMut slice.
+ * @return borrowed ZShmMut slice in case of success, NULL otherwise.
*/
#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API))
ZENOHC_API
diff --git a/include/zenoh_macros.h b/include/zenoh_macros.h
index aae0c0509..a22460340 100644
--- a/include/zenoh_macros.h
+++ b/include/zenoh_macros.h
@@ -128,6 +128,10 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x
z_owned_mutex_t : z_mutex_loan_mut, \
z_owned_publisher_t : z_publisher_loan_mut, \
z_owned_querier_t : z_querier_loan_mut, \
+ z_owned_query_t : z_query_loan_mut, \
+ z_owned_reply_err_t : z_reply_err_loan_mut, \
+ z_owned_reply_t : z_reply_loan_mut, \
+ z_owned_sample_t : z_sample_loan_mut, \
z_owned_session_t : z_session_loan_mut, \
z_owned_shm_t : z_shm_loan_mut, \
z_owned_shm_mut_t : z_shm_mut_loan_mut, \
@@ -677,6 +681,10 @@ inline z_loaned_encoding_t* z_loan_mut(z_owned_encoding_t& this_) { return z_enc
inline z_loaned_mutex_t* z_loan_mut(z_owned_mutex_t& this_) { return z_mutex_loan_mut(&this_); };
inline z_loaned_publisher_t* z_loan_mut(z_owned_publisher_t& this_) { return z_publisher_loan_mut(&this_); };
inline z_loaned_querier_t* z_loan_mut(z_owned_querier_t& this_) { return z_querier_loan_mut(&this_); };
+inline z_loaned_query_t* z_loan_mut(z_owned_query_t& this_) { return z_query_loan_mut(&this_); };
+inline z_loaned_reply_err_t* z_loan_mut(z_owned_reply_err_t& this_) { return z_reply_err_loan_mut(&this_); };
+inline z_loaned_reply_t* z_loan_mut(z_owned_reply_t& this_) { return z_reply_loan_mut(&this_); };
+inline z_loaned_sample_t* z_loan_mut(z_owned_sample_t& this_) { return z_sample_loan_mut(&this_); };
inline z_loaned_session_t* z_loan_mut(z_owned_session_t& this_) { return z_session_loan_mut(&this_); };
inline z_loaned_shm_t* z_loan_mut(z_owned_shm_t& this_) { return z_shm_loan_mut(&this_); };
inline z_loaned_shm_mut_t* z_loan_mut(z_owned_shm_mut_t& this_) { return z_shm_mut_loan_mut(&this_); };
diff --git a/src/commons.rs b/src/commons.rs
index 1eb2d22a4..a932d7d1c 100644
--- a/src/commons.rs
+++ b/src/commons.rs
@@ -118,6 +118,14 @@ pub extern "C" fn z_sample_encoding(this_: &z_loaned_sample_t) -> &z_loaned_enco
pub extern "C" fn z_sample_payload(this_: &z_loaned_sample_t) -> &z_loaned_bytes_t {
this_.as_rust_type_ref().payload().as_loaned_c_type_ref()
}
+/// Returns the mutable sample payload data.
+#[no_mangle]
+pub extern "C" fn z_sample_payload_mut(this_: &mut z_loaned_sample_t) -> &mut z_loaned_bytes_t {
+ this_
+ .as_rust_type_mut()
+ .payload_mut()
+ .as_loaned_c_type_mut()
+}
/// Returns the sample kind.
#[no_mangle]
@@ -210,6 +218,17 @@ pub unsafe extern "C" fn z_sample_loan(this_: &z_owned_sample_t) -> &z_loaned_sa
.as_loaned_c_type_ref()
}
+/// Mutably borrows sample.
+#[no_mangle]
+#[allow(clippy::missing_safety_doc)]
+pub unsafe extern "C" fn z_sample_loan_mut(this_: &mut z_owned_sample_t) -> &mut z_loaned_sample_t {
+ this_
+ .as_rust_type_mut()
+ .as_mut()
+ .unwrap_unchecked()
+ .as_loaned_c_type_mut()
+}
+
/// Frees the memory and invalidates the sample, resetting it to a gravestone state.
#[no_mangle]
pub extern "C" fn z_sample_drop(this_: &mut z_moved_sample_t) {
diff --git a/src/get.rs b/src/get.rs
index 4ccffc41b..90c110d63 100644
--- a/src/get.rs
+++ b/src/get.rs
@@ -12,7 +12,11 @@
// ZettaScale Zenoh team,
//
-use std::{ffi::CStr, mem::MaybeUninit, ptr::null};
+use std::{
+ ffi::CStr,
+ mem::MaybeUninit,
+ ptr::{null, null_mut},
+};
use libc::c_char;
use zenoh::{
@@ -60,6 +64,17 @@ pub extern "C" fn z_reply_err_payload(this_: &z_loaned_reply_err_t) -> &z_loaned
this_.as_rust_type_ref().payload().as_loaned_c_type_ref()
}
+/// Returns mutable reply error payload.
+#[no_mangle]
+pub extern "C" fn z_reply_err_payload_mut(
+ this_: &mut z_loaned_reply_err_t,
+) -> &mut z_loaned_bytes_t {
+ this_
+ .as_rust_type_mut()
+ .payload_mut()
+ .as_loaned_c_type_mut()
+}
+
/// Returns reply error encoding.
#[no_mangle]
pub extern "C" fn z_reply_err_encoding(this_: &z_loaned_reply_err_t) -> &z_loaned_encoding_t {
@@ -72,6 +87,14 @@ pub extern "C" fn z_reply_err_loan(this_: &z_owned_reply_err_t) -> &z_loaned_rep
this_.as_rust_type_ref().as_loaned_c_type_ref()
}
+/// Mutably borrows reply error.
+#[no_mangle]
+pub extern "C" fn z_reply_err_loan_mut(
+ this_: &mut z_owned_reply_err_t,
+) -> &mut z_loaned_reply_err_t {
+ this_.as_rust_type_mut().as_loaned_c_type_mut()
+}
+
/// Frees the memory and resets the reply error it to its default value.
#[no_mangle]
pub extern "C" fn z_reply_err_drop(this_: &mut z_moved_reply_err_t) {
@@ -103,6 +126,18 @@ pub unsafe extern "C" fn z_reply_ok(this_: &z_loaned_reply_t) -> *const z_loaned
}
}
+/// Yields the contents of the reply by asserting it indicates a success.
+///
+/// Returns `NULL` if reply does not contain a sample (i. e. if `z_reply_is_ok` returns ``false``).
+#[no_mangle]
+#[allow(clippy::missing_safety_doc)]
+pub unsafe extern "C" fn z_reply_ok_mut(this_: &mut z_loaned_reply_t) -> *mut z_loaned_sample_t {
+ match this_.as_rust_type_mut().result_mut() {
+ Ok(sample) => sample.as_loaned_c_type_mut() as _,
+ Err(_) => null_mut(),
+ }
+}
+
/// Yields the contents of the reply by asserting it indicates a failure.
///
/// Returns `NULL` if reply does not contain a error (i. e. if `z_reply_is_ok` returns ``true``).
@@ -115,6 +150,20 @@ pub unsafe extern "C" fn z_reply_err(this_: &z_loaned_reply_t) -> *const z_loane
}
}
+/// Yields the contents of the reply by asserting it indicates a failure.
+///
+/// Returns `NULL` if reply does not contain a error (i. e. if `z_reply_is_ok` returns ``true``).
+#[no_mangle]
+#[allow(clippy::missing_safety_doc)]
+pub unsafe extern "C" fn z_reply_err_mut(
+ this_: &mut z_loaned_reply_t,
+) -> *mut z_loaned_reply_err_t {
+ match this_.as_rust_type_mut().result_mut() {
+ Ok(_) => null_mut(),
+ Err(v) => v.as_loaned_c_type_mut(),
+ }
+}
+
#[cfg(feature = "unstable")]
/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
/// @brief Gets the id of the zenoh instance that answered this Reply.
@@ -311,6 +360,17 @@ pub unsafe extern "C" fn z_reply_loan(this_: &z_owned_reply_t) -> &z_loaned_repl
.as_loaned_c_type_ref()
}
+/// Mutably borrows reply.
+#[no_mangle]
+#[allow(clippy::missing_safety_doc)]
+pub unsafe extern "C" fn z_reply_loan_mut(this_: &mut z_owned_reply_t) -> &mut z_loaned_reply_t {
+ this_
+ .as_rust_type_mut()
+ .as_mut()
+ .unwrap_unchecked()
+ .as_loaned_c_type_mut()
+}
+
/// The replies consolidation strategy to apply on replies to a `z_get()`.
#[repr(C)]
#[derive(Clone, Copy)]
diff --git a/src/queryable.rs b/src/queryable.rs
index 4799d3583..627da12d8 100644
--- a/src/queryable.rs
+++ b/src/queryable.rs
@@ -82,6 +82,18 @@ pub unsafe extern "C" fn z_query_loan(this_: &'static z_owned_query_t) -> &z_loa
.unwrap_unchecked()
.as_loaned_c_type_ref()
}
+/// Mutably borrows the query.
+#[no_mangle]
+#[allow(clippy::missing_safety_doc)]
+pub unsafe extern "C" fn z_query_loan_mut(
+ this_: &'static mut z_owned_query_t,
+) -> &mut z_loaned_query_t {
+ this_
+ .as_rust_type_mut()
+ .as_mut()
+ .unwrap_unchecked()
+ .as_loaned_c_type_mut()
+}
/// Destroys the query resetting it to its gravestone value.
#[no_mangle]
pub extern "C" fn z_query_drop(this_: &mut z_moved_query_t) {
@@ -474,6 +486,19 @@ pub extern "C" fn z_query_payload(this_: &z_loaned_query_t) -> Option<&z_loaned_
.map(|v| v.as_loaned_c_type_ref())
}
+/// Gets mutable query payload.
+///
+/// Returns NULL if query does not contain a payload.
+#[no_mangle]
+pub extern "C" fn z_query_payload_mut(
+ this_: &mut z_loaned_query_t,
+) -> Option<&mut z_loaned_bytes_t> {
+ this_
+ .as_rust_type_mut()
+ .payload_mut()
+ .map(|v| v.as_loaned_c_type_mut())
+}
+
/// Gets query payload encoding.
///
/// Returns NULL if query does not contain an encoding.
@@ -496,6 +521,19 @@ pub extern "C" fn z_query_attachment(this_: &z_loaned_query_t) -> Option<&z_loan
.map(|a| a.as_loaned_c_type_ref())
}
+/// Gets mutable query attachment.
+///
+/// Returns NULL if query does not contain an attachment.
+#[no_mangle]
+pub extern "C" fn z_query_attachment_mut(
+ this_: &mut z_loaned_query_t,
+) -> Option<&mut z_loaned_bytes_t> {
+ this_
+ .as_rust_type_mut()
+ .attachment_mut()
+ .map(|a| a.as_loaned_c_type_mut())
+}
+
/// Undeclares a `z_owned_queryable_t`.
/// Returns 0 in case of success, negative error code otherwise.
#[no_mangle]
diff --git a/src/shm/buffer/zshm.rs b/src/shm/buffer/zshm.rs
index 82f41e3fb..d480c38c7 100644
--- a/src/shm/buffer/zshm.rs
+++ b/src/shm/buffer/zshm.rs
@@ -115,6 +115,7 @@ pub extern "C" fn z_shm_drop(this_: &mut z_moved_shm_t) {
/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
/// @brief Tries to reborrow mutably-borrowed ZShm slice as borrowed ZShmMut slice.
+/// @return borrowed ZShmMut slice in case of success, NULL otherwise.
#[no_mangle]
pub extern "C" fn z_shm_try_reloan_mut(this_: &mut z_loaned_shm_t) -> *mut z_loaned_shm_mut_t {
let this = this_.as_rust_type_mut();
diff --git a/src/zbytes.rs b/src/zbytes.rs
index 5cc2eb874..df960856d 100644
--- a/src/zbytes.rs
+++ b/src/zbytes.rs
@@ -199,7 +199,7 @@ pub unsafe extern "C" fn z_bytes_as_loaned_shm(
/// @param dst: An uninitialized memory location where to construct an SHM buffer.
#[no_mangle]
#[allow(clippy::missing_safety_doc)]
-pub unsafe extern "C" fn z_bytes_to_mut_loaned_shm(
+pub unsafe extern "C" fn z_bytes_as_mut_loaned_shm(
this: &'static mut z_loaned_bytes_t,
dst: &'static mut MaybeUninit<&'static mut z_loaned_shm_t>,
) -> z_result_t {