From a840a10265e05edb0038dddd2e64d72c7493e0dc Mon Sep 17 00:00:00 2001 From: ChenYing Kuo Date: Tue, 23 Jan 2024 14:24:38 +0800 Subject: [PATCH 1/2] Able to unwrap while using reply with attachment. Signed-off-by: ChenYing Kuo --- zenoh/src/queryable.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zenoh/src/queryable.rs b/zenoh/src/queryable.rs index 914684f76f..b602ba670b 100644 --- a/zenoh/src/queryable.rs +++ b/zenoh/src/queryable.rs @@ -155,6 +155,7 @@ impl fmt::Display for Query { /// A builder returned by [`Query::reply()`](Query::reply). #[must_use = "Resolvables do nothing unless you resolve them using the `res` method from either `SyncResolve` or `AsyncResolve`"] +#[derive(Debug)] pub struct ReplyBuilder<'a> { query: &'a Query, result: Result, From 40947c392690b9473a6770d2bdc8465d846dd330 Mon Sep 17 00:00:00 2001 From: ChenYing Kuo Date: Thu, 25 Jan 2024 18:21:49 +0800 Subject: [PATCH 2/2] Add Debug trait to other Builder. Signed-off-by: ChenYing Kuo --- zenoh/src/info.rs | 3 +++ zenoh/src/sample.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/zenoh/src/info.rs b/zenoh/src/info.rs index 28579b3d6c..9e3fe17fc8 100644 --- a/zenoh/src/info.rs +++ b/zenoh/src/info.rs @@ -32,6 +32,7 @@ use zenoh_protocol::core::{WhatAmI, ZenohId}; /// # }) /// ``` #[must_use = "Resolvables do nothing unless you resolve them using the `res` method from either `SyncResolve` or `AsyncResolve`"] +#[derive(Debug)] pub struct ZidBuilder<'a> { pub(crate) session: SessionRef<'a>, } @@ -69,6 +70,7 @@ impl<'a> AsyncResolve for ZidBuilder<'a> { /// # }) /// ``` #[must_use = "Resolvables do nothing unless you resolve them using the `res` method from either `SyncResolve` or `AsyncResolve`"] +#[derive(Debug)] pub struct RoutersZidBuilder<'a> { pub(crate) session: SessionRef<'a>, } @@ -115,6 +117,7 @@ impl<'a> AsyncResolve for RoutersZidBuilder<'a> { /// # }) /// ``` #[must_use = "Resolvables do nothing unless you resolve them using the `res` method from either `SyncResolve` or `AsyncResolve`"] +#[derive(Debug)] pub struct PeersZidBuilder<'a> { pub(crate) session: SessionRef<'a>, } diff --git a/zenoh/src/sample.rs b/zenoh/src/sample.rs index 083e6fced5..5d707e5936 100644 --- a/zenoh/src/sample.rs +++ b/zenoh/src/sample.rs @@ -112,6 +112,7 @@ mod attachment { /// A builder for [`Attachment`] #[zenoh_macros::unstable] + #[derive(Debug)] pub struct AttachmentBuilder { pub(crate) inner: Vec, }