From 1790d59d1a9aa4995b3997f6fa96e90b24d28a25 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Wed, 26 Jun 2024 21:20:21 +0200 Subject: [PATCH] Fix doc warnings (#1197) * Fix and Improve liveliness doc * Fix doc warnings * Add doc warnings check in CI --- .github/workflows/ci.yml | 5 ++++ .../zenoh-keyexpr/src/key_expr/format/mod.rs | 10 +++---- commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs | 2 +- commons/zenoh-keyexpr/src/lib.rs | 8 ++--- commons/zenoh-protocol/src/core/mod.rs | 2 +- commons/zenoh-protocol/src/core/parameters.rs | 6 ++-- commons/zenoh-protocol/src/network/declare.rs | 8 +++-- commons/zenoh-protocol/src/network/mod.rs | 2 ++ commons/zenoh-protocol/src/network/request.rs | 3 +- commons/zenoh-protocol/src/scouting/hello.rs | 10 +++---- commons/zenoh-protocol/src/scouting/scout.rs | 2 +- .../zenoh-protocol/src/transport/fragment.rs | 2 +- commons/zenoh-protocol/src/transport/frame.rs | 6 ++-- commons/zenoh-protocol/src/transport/mod.rs | 2 ++ commons/zenoh-protocol/src/zenoh/mod.rs | 2 ++ commons/zenoh-util/src/log.rs | 4 +-- io/zenoh-transport/src/common/batch.rs | 30 +++++++++---------- .../unicast/establishment/ext/auth/pubkey.rs | 8 +++++ .../unicast/establishment/ext/auth/usrpwd.rs | 8 +++++ .../src/unicast/establishment/ext/shm.rs | 8 +++++ plugins/zenoh-backend-traits/src/lib.rs | 2 +- plugins/zenoh-plugin-trait/src/lib.rs | 6 ++-- plugins/zenoh-plugin-trait/src/manager.rs | 2 +- plugins/zenoh-plugin-trait/src/plugin.rs | 4 +-- zenoh/src/api/info.rs | 2 +- zenoh/src/api/liveliness.rs | 2 +- zenoh/src/api/query.rs | 4 +-- zenoh/src/api/queryable.rs | 8 ++--- zenoh/src/api/scouting.rs | 8 ++--- zenoh/src/api/selector.rs | 2 +- zenoh/src/api/session.rs | 16 +++++----- zenoh/src/api/subscriber.rs | 6 ++-- zenoh/src/lib.rs | 24 +++++++-------- zenohd/src/main.rs | 2 +- 34 files changed, 128 insertions(+), 88 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a62257446e..123085319e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,11 @@ jobs: - name: Run doctests run: cargo test --doc + - name: Build doc + run: cargo doc --no-deps --features unstable + env: + RUSTDOCFLAGS: -Dwarnings + - name: Check licenses run: cargo deny check licenses diff --git a/commons/zenoh-keyexpr/src/key_expr/format/mod.rs b/commons/zenoh-keyexpr/src/key_expr/format/mod.rs index bf5536ec63..d4eccd6d41 100644 --- a/commons/zenoh-keyexpr/src/key_expr/format/mod.rs +++ b/commons/zenoh-keyexpr/src/key_expr/format/mod.rs @@ -17,8 +17,8 @@ //! The same issue arises naturally when designing a KE space, and [`KeFormat`] was designed to help you with this, //! both in constructing and in parsing KEs that fit the formats you've defined. //! -//! [`kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, -//! as the [`keformat`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist. +//! [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, +//! as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.htmll) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist. //! //! ## The format syntax //! KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks. @@ -67,8 +67,8 @@ use support::{IterativeConstructor, Spec}; /// The same issue arises naturally when designing a KE space, and [`KeFormat`] was designed to help you with this, /// both in constructing and in parsing KEs that fit the formats you've defined. /// -/// [`zenoh::kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, -/// as the [`zenoh::keformat`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.keformat.html) and [`zenoh::kewrite`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist. +/// [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, +/// as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist. /// /// ## The format syntax /// KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks. @@ -120,7 +120,7 @@ impl<'s> KeFormat<'s, Vec>> { /// /// `N` is simply the number of specifications in `value`. If this number of specs isn't known at compile-time, use [`KeFormat::new`] instead. /// - /// If you know `value` at compile time, using [`zenoh::kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) instead is advised, + /// If you know `value` at compile time, using [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) instead is advised, /// as it will provide more features and construct higher performance formats than this constructor. pub fn noalloc_new(value: &'s str) -> ZResult; N]>> { value.try_into() diff --git a/commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs b/commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs index 5d7991289e..5bd0f7dae3 100644 --- a/commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs +++ b/commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs @@ -47,7 +47,7 @@ //! # Iterators //! KeTrees provide iterators for the following operations: //! - Iterating on all nodes ([`IKeyExprTree::tree_iter`]/[`IKeyExprTreeMut::tree_iter_mut`]) -//! - Iterating on key-value pairs in the KeTree ([`IKeyExprTreeExt::key_value_pairs`]) +//! - Iterating on key-value pairs in the KeTree ([`IKeyExprTree::key_value_pairs`]) //! - Iterating on nodes whose KE intersects with a queried KE ([`IKeyExprTree::intersecting_nodes`], [`IKeyExprTreeMut::intersecting_nodes_mut`]) //! - Iterating on nodes whose KE are included by a queried KE ([`IKeyExprTree::included_nodes`], [`IKeyExprTreeMut::included_nodes_mut`]) //! - Iterating on nodes whose KE includes a queried KE ([`IKeyExprTree::nodes_including`], [`IKeyExprTreeMut::nodes_including_mut`]) diff --git a/commons/zenoh-keyexpr/src/lib.rs b/commons/zenoh-keyexpr/src/lib.rs index f80a9c177c..5142076b6d 100644 --- a/commons/zenoh-keyexpr/src/lib.rs +++ b/commons/zenoh-keyexpr/src/lib.rs @@ -22,8 +22,8 @@ //! # Storing Key Expressions //! This module provides 2 flavours to store strings that have been validated to respect the KE syntax, and a third is provided by [`zenoh`](https://docs.rs/zenoh): //! - [`keyexpr`] is the equivalent of a [`str`], -//! - [`OwnedKeyExpr`] works like an [`Arc`], -//! - [`KeyExpr`](https://docs.rs/zenoh/latest/zenoh/key_expr/struct.KeyExpr.html) works like a [`Cow`], but also stores some additional context internal to Zenoh to optimize +//! - [`OwnedKeyExpr`] works like an [`Arc`](std::sync::Arc), +//! - [`KeyExpr`](https://docs.rs/zenoh/latest/zenoh/key_expr/struct.KeyExpr.html) works like a [`Cow`](std::borrow::Cow), but also stores some additional context internal to Zenoh to optimize //! routing and network usage. //! //! All of these types [`Deref`](core::ops::Deref) to [`keyexpr`], which notably has methods to check whether a given [`keyexpr::intersects`] with another, @@ -40,8 +40,8 @@ //! The same issue arises naturally when designing a KE space, and [`KeFormat`](format::KeFormat) was designed to help you with this, //! both in constructing and in parsing KEs that fit the formats you've defined. //! -//! [`kedefine`] also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, -//! as the [`keformat`] and [`kewrite`] macros will be able to tell you if you're attempting to set fields of the format that do not exist. +//! [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, +//! as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist. #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc; diff --git a/commons/zenoh-protocol/src/core/mod.rs b/commons/zenoh-protocol/src/core/mod.rs index e9bc700318..ebf1bb7f85 100644 --- a/commons/zenoh-protocol/src/core/mod.rs +++ b/commons/zenoh-protocol/src/core/mod.rs @@ -273,7 +273,7 @@ impl<'de> serde::Deserialize<'de> for ZenohIdProto { } } -/// The unique id of a zenoh entity inside it's parent [`Session`]. +/// The unique id of a zenoh entity inside it's parent `Session`. pub type EntityId = u32; /// The global unique id of a zenoh entity. diff --git a/commons/zenoh-protocol/src/core/parameters.rs b/commons/zenoh-protocol/src/core/parameters.rs index e44f2f6284..38cb368b5b 100644 --- a/commons/zenoh-protocol/src/core/parameters.rs +++ b/commons/zenoh-protocol/src/core/parameters.rs @@ -50,7 +50,7 @@ pub fn iter(s: &str) -> impl DoubleEndedIterator + Clone { .map(|p| split_once(p, FIELD_SEPARATOR)) } -/// Same as [`Self::from_iter_into`] but keys are sorted in alphabetical order. +/// Same as [`from_iter_into`] but keys are sorted in alphabetical order. pub fn sort<'s, I>(iter: I) -> impl Iterator where I: Iterator, @@ -84,7 +84,7 @@ where into } -/// Same as [`Self::from_iter`] but it writes into a user-provided string instead of allocating a new one. +/// Same as [`from_iter`] but it writes into a user-provided string instead of allocating a new one. pub fn from_iter_into<'s, I>(iter: I, into: &mut String) where I: Iterator, @@ -131,7 +131,7 @@ pub fn insert<'s>(s: &'s str, k: &'s str, v: &'s str) -> (String, Option<&'s str (from_iter(iter), item) } -/// Same as [`Self::insert`] but keys are sorted in alphabetical order. +/// Same as [`insert`] but keys are sorted in alphabetical order. pub fn insert_sort<'s>(s: &'s str, k: &'s str, v: &'s str) -> (String, Option<&'s str>) { let (iter, item) = _insert(iter(s), k, v); (from_iter(sort(iter)), item) diff --git a/commons/zenoh-protocol/src/network/declare.rs b/commons/zenoh-protocol/src/network/declare.rs index d8c66559ce..8f31e0ff2a 100644 --- a/commons/zenoh-protocol/src/network/declare.rs +++ b/commons/zenoh-protocol/src/network/declare.rs @@ -32,6 +32,7 @@ pub mod flag { pub const Z: u8 = 1 << 7; // 0x80 Extensions if Z==1 then an extension will follow } +/// ```text /// Flags: /// - I: Interest If I==1 then interest_id is present /// - X: Reserved @@ -47,7 +48,7 @@ pub mod flag { /// +---------------+ /// ~ declaration ~ /// +---------------+ -/// +/// ``` #[derive(Debug, Clone, PartialEq, Eq)] pub struct Declare { pub interest_id: Option, @@ -178,6 +179,7 @@ pub mod common { pub mod ext { use super::*; + /// ```text /// Flags: /// - N: Named If N==1 then the key expr has name/suffix /// - M: Mapping if M==1 then key expr mapping is the one declared by the sender, else it is the one declared by the receiver @@ -190,7 +192,7 @@ pub mod common { /// +---------------+ /// ~ key_suffix ~ if N==1 -- /// +---------------+ - /// + /// ``` pub type WireExprExt = zextzbuf!(0x0f, true); #[derive(Debug, Clone, PartialEq, Eq)] pub struct WireExprType { @@ -513,6 +515,7 @@ pub mod queryable { pub const C: u8 = 1; // 0x01 Complete if C==1 then the queryable is complete } /// + /// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// |Z|0_1| ID | @@ -521,6 +524,7 @@ pub mod queryable { /// +---------------+ /// ~ distance ~ /// +---------------+ + /// ``` #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct QueryableInfoType { pub complete: bool, // Default false: incomplete diff --git a/commons/zenoh-protocol/src/network/mod.rs b/commons/zenoh-protocol/src/network/mod.rs index b9f3076581..407df6dd52 100644 --- a/commons/zenoh-protocol/src/network/mod.rs +++ b/commons/zenoh-protocol/src/network/mod.rs @@ -418,6 +418,7 @@ pub mod ext { } } + /// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// |zid_len|X|X|X|X| @@ -426,6 +427,7 @@ pub mod ext { /// +---------------+ /// % eid % /// +---------------+ + /// ``` #[derive(Debug, Clone, PartialEq, Eq)] pub struct EntityGlobalIdType { pub zid: ZenohIdProto, diff --git a/commons/zenoh-protocol/src/network/request.rs b/commons/zenoh-protocol/src/network/request.rs index 09e8e6b2b6..ceeec85043 100644 --- a/commons/zenoh-protocol/src/network/request.rs +++ b/commons/zenoh-protocol/src/network/request.rs @@ -82,12 +82,13 @@ pub mod ext { pub type NodeIdType = crate::network::ext::NodeIdType<{ NodeId::ID }>; pub type Target = zextz64!(0x4, true); + /// ```text /// - Target (0x03) /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// % target % /// +---------------+ - /// + /// ``` /// The `zenoh::queryable::Queryable`s that should be target of a `zenoh::Session::get()`. #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub enum TargetType { diff --git a/commons/zenoh-protocol/src/scouting/hello.rs b/commons/zenoh-protocol/src/scouting/hello.rs index 61c7db4ce6..69109ed611 100644 --- a/commons/zenoh-protocol/src/scouting/hello.rs +++ b/commons/zenoh-protocol/src/scouting/hello.rs @@ -17,8 +17,8 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto}; /// # Hello message /// -/// The [`Hello`] message is used to advertise the locators a zenoh node is reachable at. -/// The [`Hello`] message SHOULD be sent in a unicast fashion in response to a [`super::Scout`] +/// The `Hello` message is used to advertise the locators a zenoh node is reachable at. +/// The `Hello` message SHOULD be sent in a unicast fashion in response to a [`super::Scout`] /// message as shown below: /// /// ```text @@ -34,7 +34,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto}; /// | | | /// ``` /// -/// Moreover, a [`Hello`] message MAY be sent in the network in a multicast +/// Moreover, a `Hello` message MAY be sent in the network in a multicast /// fashion to advertise the presence of zenoh node. The advertisement operation MAY be performed /// periodically as shown below: /// @@ -54,7 +54,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto}; /// | | | /// ``` /// -/// Examples of locators included in the [`Hello`] message are: +/// Examples of locators included in the `Hello` message are: /// /// ```text /// udp/192.168.1.1:7447 @@ -63,7 +63,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto}; /// tcp/localhost:7447 /// ``` /// -/// The [`Hello`] message structure is defined as follows: +/// The `Hello` message structure is defined as follows: /// /// ```text /// Header flags: diff --git a/commons/zenoh-protocol/src/scouting/scout.rs b/commons/zenoh-protocol/src/scouting/scout.rs index 6d2b49f335..a65c10a4f5 100644 --- a/commons/zenoh-protocol/src/scouting/scout.rs +++ b/commons/zenoh-protocol/src/scouting/scout.rs @@ -18,7 +18,7 @@ use crate::core::{whatami::WhatAmIMatcher, ZenohIdProto}; /// The [`Scout`] message MAY be sent at any point in time to discover the available zenoh nodes in the /// network. The [`Scout`] message SHOULD be sent in a multicast or broadcast fashion. Upon receiving a /// [`Scout`] message, a zenoh node MUST first verify whether the matching criteria are satisfied, then -/// it SHOULD reply with a [`super::Hello`] message in a unicast fashion including all the requested +/// it SHOULD reply with a [`super::HelloProto`] message in a unicast fashion including all the requested /// information. /// /// The scouting message flow is the following: diff --git a/commons/zenoh-protocol/src/transport/fragment.rs b/commons/zenoh-protocol/src/transport/fragment.rs index d60df23227..eccc7b80c0 100644 --- a/commons/zenoh-protocol/src/transport/fragment.rs +++ b/commons/zenoh-protocol/src/transport/fragment.rs @@ -18,7 +18,7 @@ pub use crate::transport::TransportSn; /// # Fragment message /// -/// The [`Fragment`] message is used to transmit on the wire large [`crate::zenoh::ZenohMessage`] +/// The [`Fragment`] message is used to transmit on the wire large [`crate::network::NetworkMessage`] /// that require fragmentation because they are larger than the maximum batch size /// (i.e. 2^16-1) and/or the link MTU. /// diff --git a/commons/zenoh-protocol/src/transport/frame.rs b/commons/zenoh-protocol/src/transport/frame.rs index 480bebe08e..b3ef1d819f 100644 --- a/commons/zenoh-protocol/src/transport/frame.rs +++ b/commons/zenoh-protocol/src/transport/frame.rs @@ -18,11 +18,11 @@ use crate::{core::Reliability, network::NetworkMessage, transport::TransportSn}; /// # Frame message /// /// The [`Frame`] message is used to transmit one ore more complete serialized -/// [`crate::net::protocol::message::ZenohMessage`]. I.e., the total length of the -/// serialized [`crate::net::protocol::message::ZenohMessage`] (s) MUST be smaller +/// [`crate::network::NetworkMessage`]. I.e., the total length of the +/// serialized [`crate::network::NetworkMessage`] (s) MUST be smaller /// than the maximum batch size (i.e. 2^16-1) and the link MTU. /// The [`Frame`] message is used as means to aggregate multiple -/// [`crate::net::protocol::message::ZenohMessage`] in a single atomic message that +/// [`crate::network::NetworkMessage`] in a single atomic message that /// goes on the wire. By doing so, many small messages can be batched together and /// share common information like the sequence number. /// diff --git a/commons/zenoh-protocol/src/transport/mod.rs b/commons/zenoh-protocol/src/transport/mod.rs index e92860f441..ba2ac32c4a 100644 --- a/commons/zenoh-protocol/src/transport/mod.rs +++ b/commons/zenoh-protocol/src/transport/mod.rs @@ -255,11 +255,13 @@ impl fmt::Display for TransportMessage { pub mod ext { use crate::{common::ZExtZ64, core::Priority}; + /// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// %0| rsv |prio % /// +---------------+ /// - prio: Priority class + /// ``` #[repr(transparent)] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct QoSType { diff --git a/commons/zenoh-protocol/src/zenoh/mod.rs b/commons/zenoh-protocol/src/zenoh/mod.rs index eeb1a63c1d..320db6884d 100644 --- a/commons/zenoh-protocol/src/zenoh/mod.rs +++ b/commons/zenoh-protocol/src/zenoh/mod.rs @@ -138,6 +138,7 @@ pub mod ext { use crate::core::{Encoding, EntityGlobalIdProto}; + /// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// |zid_len|X|X|X|X| @@ -148,6 +149,7 @@ pub mod ext { /// +---------------+ /// % sn % /// +---------------+ + /// ``` #[derive(Debug, Clone, PartialEq, Eq)] pub struct SourceInfoType { pub id: EntityGlobalIdProto, diff --git a/commons/zenoh-util/src/log.rs b/commons/zenoh-util/src/log.rs index 67f1a45df7..023c77121f 100644 --- a/commons/zenoh-util/src/log.rs +++ b/commons/zenoh-util/src/log.rs @@ -27,7 +27,7 @@ use tracing_subscriber::{ /// Calling this function initializes a `lazy_static` in the `tracing` crate /// such static is not deallocated prior to process existing, thus tools such as `valgrind` /// will report a memory leak. -/// Refer to this issue: https://github.com/tokio-rs/tracing/issues/2069 +/// Refer to this issue: pub fn try_init_log_from_env() { if let Ok(env_filter) = EnvFilter::try_from_default_env() { init_env_filter(env_filter); @@ -41,7 +41,7 @@ pub fn try_init_log_from_env() { /// Calling this function initializes a `lazy_static` in the `tracing` crate /// such static is not deallocated prior to process existing, thus tools such as `valgrind` /// will report a memory leak. -/// Refer to this issue: https://github.com/tokio-rs/tracing/issues/2069 +/// Refer to this issue: pub fn init_log_from_env_or(fallback: S) where S: AsRef, diff --git a/io/zenoh-transport/src/common/batch.rs b/io/zenoh-transport/src/common/batch.rs index 9a58aafd5d..1b065191c0 100644 --- a/io/zenoh-transport/src/common/batch.rs +++ b/io/zenoh-transport/src/common/batch.rs @@ -149,7 +149,7 @@ impl BatchHeader { self.0 } - /// Verify that the [`WBatch`][WBatch] is for a stream-based protocol, i.e., the first + /// Verify that the [`WBatch`] is for a stream-based protocol, i.e., the first /// 2 bytes are reserved to encode the total amount of serialized bytes as 16-bits little endian. #[cfg(feature = "transport_compression")] #[inline(always)] @@ -181,22 +181,22 @@ pub enum Finalize { /// Write Batch /// -/// A [`WBatch`][WBatch] is a non-expandable and contiguous region of memory -/// that is used to serialize [`TransportMessage`][TransportMessage] and [`ZenohMessage`][ZenohMessage]. +/// A [`WBatch`] is a non-expandable and contiguous region of memory +/// that is used to serialize [`TransportMessage`] and [`NetworkMessage`]. /// -/// [`TransportMessage`][TransportMessage] are always serialized on the batch as they are, while -/// [`ZenohMessage`][ZenohMessage] are always serializaed on the batch as part of a [`TransportMessage`] +/// [`TransportMessage`] are always serialized on the batch as they are, while +/// [`NetworkMessage`] are always serializaed on the batch as part of a [`TransportMessage`] /// [TransportMessage] Frame. Reliable and Best Effort Frames can be interleaved on the same -/// [`WBatch`][WBatch] as long as they fit in the remaining buffer capacity. +/// [`WBatch`] as long as they fit in the remaining buffer capacity. /// -/// In the serialized form, the [`WBatch`][WBatch] always contains one or more -/// [`TransportMessage`][TransportMessage]. In the particular case of [`TransportMessage`][TransportMessage] Frame, -/// its payload is either (i) one or more complete [`ZenohMessage`][ZenohMessage] or (ii) a fragment of a -/// a [`ZenohMessage`][ZenohMessage]. +/// In the serialized form, the [`WBatch`] always contains one or more +/// [`TransportMessage`]. In the particular case of [`TransportMessage`] Frame, +/// its payload is either (i) one or more complete [`NetworkMessage`] or (ii) a fragment of a +/// a [`NetworkMessage`]. /// -/// As an example, the content of the [`WBatch`][WBatch] in memory could be: +/// As an example, the content of the [`WBatch`] in memory could be: /// -/// | Keep Alive | Frame Reliable | Frame Best Effort | +/// | Keep Alive | Frame Reliable\ | Frame Best Effort\ | /// #[derive(Clone, Debug)] pub struct WBatch { @@ -227,20 +227,20 @@ impl WBatch { batch } - /// Verify that the [`WBatch`][WBatch] has no serialized bytes. + /// Verify that the [`WBatch`] has no serialized bytes. #[inline(always)] pub fn is_empty(&self) -> bool { self.len() == 0 } - /// Get the total number of bytes that have been serialized on the [`WBatch`][WBatch]. + /// Get the total number of bytes that have been serialized on the [`WBatch`]. #[inline(always)] pub fn len(&self) -> BatchSize { let (_l, _h, p) = Self::split(self.buffer.as_slice(), &self.config); p.len() as BatchSize } - /// Clear the [`WBatch`][WBatch] memory buffer and related internal state. + /// Clear the [`WBatch`] memory buffer and related internal state. #[inline(always)] pub fn clear(&mut self) { self.buffer.clear(); diff --git a/io/zenoh-transport/src/unicast/establishment/ext/auth/pubkey.rs b/io/zenoh-transport/src/unicast/establishment/ext/auth/pubkey.rs index 69b4707bf0..5638a9ee33 100644 --- a/io/zenoh-transport/src/unicast/establishment/ext/auth/pubkey.rs +++ b/io/zenoh-transport/src/unicast/establishment/ext/auth/pubkey.rs @@ -213,12 +213,14 @@ where /*************************************/ /* InitSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ public key ~ /// +---------------+ /// /// ZExtZBuf +/// ``` pub(crate) struct InitSyn { pub(crate) alice_pubkey: ZPublicKey, } @@ -250,6 +252,7 @@ where /*************************************/ /* InitAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ public key ~ @@ -258,6 +261,7 @@ where /// +---------------+ /// /// ZExtZBuf +/// ``` pub(crate) struct InitAck { pub(crate) bob_pubkey: ZPublicKey, pub(crate) nonce_encrypted_with_alice_pubkey: Vec, @@ -295,12 +299,14 @@ where /*************************************/ /* OpenSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ ciphered nonce~ /// +---------------+ /// /// ZExtZBuf +/// ``` pub(crate) struct OpenSyn { pub(crate) nonce_encrypted_with_bob_pubkey: Vec, } @@ -334,11 +340,13 @@ where /*************************************/ /* OpenAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// +---------------+ /// /// ZExtUnit +/// ``` pub(crate) struct AuthPubKeyFsm<'a> { inner: &'a RwLock, diff --git a/io/zenoh-transport/src/unicast/establishment/ext/auth/usrpwd.rs b/io/zenoh-transport/src/unicast/establishment/ext/auth/usrpwd.rs index 22d7a86817..46d3f349b4 100644 --- a/io/zenoh-transport/src/unicast/establishment/ext/auth/usrpwd.rs +++ b/io/zenoh-transport/src/unicast/establishment/ext/auth/usrpwd.rs @@ -217,25 +217,30 @@ impl<'a> AuthUsrPwdFsm<'a> { /*************************************/ /* InitSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// +---------------+ /// /// ZExtUnit +/// ``` /*************************************/ /* InitAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ nonce ~ /// +---------------+ /// /// ZExtZ64 +/// ``` /*************************************/ /* OpenSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ user ~ @@ -244,6 +249,7 @@ impl<'a> AuthUsrPwdFsm<'a> { /// +---------------+ /// /// ZExtZBuf +/// ``` struct OpenSyn { user: Vec, hmac: Vec, @@ -278,11 +284,13 @@ where /*************************************/ /* OpenAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// +---------------+ /// /// ZExtUnit +/// ``` #[async_trait] impl<'a> OpenFsm for &'a AuthUsrPwdFsm<'a> { diff --git a/io/zenoh-transport/src/unicast/establishment/ext/shm.rs b/io/zenoh-transport/src/unicast/establishment/ext/shm.rs index bc96d2e34a..1a6f272d42 100644 --- a/io/zenoh-transport/src/unicast/establishment/ext/shm.rs +++ b/io/zenoh-transport/src/unicast/establishment/ext/shm.rs @@ -109,10 +109,12 @@ impl AuthUnicast { /*************************************/ /* InitSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ Segment id ~ /// +---------------+ +/// ``` pub(crate) struct InitSyn { pub(crate) alice_segment: AuthSegmentID, } @@ -145,12 +147,14 @@ where /*************************************/ /* InitAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ challenge ~ /// +---------------+ /// ~ Segment id ~ /// +---------------+ +/// ``` struct InitAck { alice_challenge: u64, bob_segment: AuthSegmentID, @@ -188,18 +192,22 @@ where /*************************************/ /* OpenSyn */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ challenge ~ /// +---------------+ +/// ``` /*************************************/ /* OpenAck */ /*************************************/ +/// ```text /// 7 6 5 4 3 2 1 0 /// +-+-+-+-+-+-+-+-+ /// ~ ack ~ /// +---------------+ +/// ``` // Extension Fsm pub(crate) struct ShmFsm<'a> { diff --git a/plugins/zenoh-backend-traits/src/lib.rs b/plugins/zenoh-backend-traits/src/lib.rs index d59d764004..851e9cfbb0 100644 --- a/plugins/zenoh-backend-traits/src/lib.rs +++ b/plugins/zenoh-backend-traits/src/lib.rs @@ -225,7 +225,7 @@ pub trait Storage: Send + Sync { /// on the administration space for this storage. fn get_admin_status(&self) -> serde_json::Value; - /// Function called for each incoming data ([`Sample`]) to be stored in this storage. + /// Function called for each incoming data ([`Sample`](zenoh::sample::Sample)) to be stored in this storage. /// A key can be `None` if it matches the `strip_prefix` exactly. /// In order to avoid data loss, the storage must store the `value` and `timestamp` associated with the `None` key /// in a manner suitable for the given backend technology diff --git a/plugins/zenoh-plugin-trait/src/lib.rs b/plugins/zenoh-plugin-trait/src/lib.rs index b9dbb455ab..36c5097795 100644 --- a/plugins/zenoh-plugin-trait/src/lib.rs +++ b/plugins/zenoh-plugin-trait/src/lib.rs @@ -25,13 +25,13 @@ //! //! The actual work of the plugin is performed by the instance, which is created by the [`start`](Plugin::start) function. //! -//! Plugins are loaded, started and stopped by [`PluginsManager`](crate::manager::PluginsManager). Stopping plugin is just dropping it's instance. +//! Plugins are loaded, started and stopped by [`PluginsManager`]. Stopping plugin is just dropping it's instance. //! //! Plugins can be static and dynamic. //! -//! Static plugin is just a type which implements [`Plugin`] trait. It can be added to [`PluginsManager`](crate::manager::PluginsManager) by [`PluginsManager::add_static_plugin`](crate::manager::PluginsManager::add_static_plugin) method. +//! Static plugin is just a type which implements [`Plugin`] trait. It can be added to [`PluginsManager`] by [`PluginsManager::declare_static_plugin`](crate::manager::PluginsManager::declare_static_plugin) method. //! -//! Dynamic plugin is a shared library which exports set of C-repr (unmangled) functions which allows to check plugin compatibility and create plugin instance. These functiuons are defined automatically by [`declare_plugin`](crate::declare_plugin) macro. +//! Dynamic plugin is a shared library which exports set of C-repr (unmangled) functions which allows to check plugin compatibility and create plugin instance. These functiuons are defined automatically by [`declare_plugin`] macro. //! mod compatibility; mod manager; diff --git a/plugins/zenoh-plugin-trait/src/manager.rs b/plugins/zenoh-plugin-trait/src/manager.rs index 5c9c9e8bd2..90651532ec 100644 --- a/plugins/zenoh-plugin-trait/src/manager.rs +++ b/plugins/zenoh-plugin-trait/src/manager.rs @@ -100,7 +100,7 @@ impl DeclaredPlugin { default_lib_prefix: String, loader: Option, diff --git a/plugins/zenoh-plugin-trait/src/plugin.rs b/plugins/zenoh-plugin-trait/src/plugin.rs index 373da64634..b0651d9842 100644 --- a/plugins/zenoh-plugin-trait/src/plugin.rs +++ b/plugins/zenoh-plugin-trait/src/plugin.rs @@ -175,9 +175,9 @@ pub trait Plugin: Sized + 'static { type Instance: PluginInstance; /// Plugins' default name when statically linked. const DEFAULT_NAME: &'static str; - /// Plugin's version. Used only for information purposes. It's recommended to use [plugin_version!] macro to generate this string. + /// Plugin's version. Used only for information purposes. It's recommended to use [plugin_version!](crate::plugin_version!) macro to generate this string. const PLUGIN_VERSION: &'static str; - /// Plugin's long version (with git commit hash). Used only for information purposes. It's recommended to use [plugin_long_version!] macro to generate this string. + /// Plugin's long version (with git commit hash). Used only for information purposes. It's recommended to use [plugin_version!](crate::plugin_version!) macro to generate this string. const PLUGIN_LONG_VERSION: &'static str; /// Starts your plugin. Use `Ok` to return your plugin's control structure fn start(name: &str, args: &Self::StartArgs) -> ZResult; diff --git a/zenoh/src/api/info.rs b/zenoh/src/api/info.rs index 4a53a60851..32bed0eb53 100644 --- a/zenoh/src/api/info.rs +++ b/zenoh/src/api/info.rs @@ -159,7 +159,7 @@ impl<'a> IntoFuture for PeersZenohIdBuilder<'a> { } } -/// Struct returned by [`Session::info()`](crate::SessionDeclarations::info) which allows +/// Struct returned by [`Session::info()`](crate::session::SessionDeclarations::info) which allows /// to access information about the current zenoh [`Session`](crate::Session). /// /// # Examples diff --git a/zenoh/src/api/liveliness.rs b/zenoh/src/api/liveliness.rs index 04b69183a3..038a4b8eab 100644 --- a/zenoh/src/api/liveliness.rs +++ b/zenoh/src/api/liveliness.rs @@ -705,7 +705,7 @@ impl<'a, 'b> LivelinessGetBuilder<'a, 'b, DefaultHandler> { self.callback(locked(callback)) } - /// Receive the replies for this liveliness query with a [`Handler`](crate::prelude::IntoHandler). + /// Receive the replies for this liveliness query with a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ``` diff --git a/zenoh/src/api/query.rs b/zenoh/src/api/query.rs index 408be5514b..e9598a0064 100644 --- a/zenoh/src/api/query.rs +++ b/zenoh/src/api/query.rs @@ -308,7 +308,7 @@ impl<'a, 'b> SessionGetBuilder<'a, 'b, DefaultHandler> { /// Receive the replies for this query with a mutable callback. /// /// Using this guarantees that your callback will never be called concurrently. - /// If your callback is also accepted by the [`callback`](GetBuilder::callback) method, we suggest you use it instead of `callback_mut` + /// If your callback is also accepted by the [`callback`](crate::session::SessionGetBuilder::callback) method, we suggest you use it instead of `callback_mut` /// /// # Examples /// ``` @@ -336,7 +336,7 @@ impl<'a, 'b> SessionGetBuilder<'a, 'b, DefaultHandler> { self.callback(locked(callback)) } - /// Receive the replies for this query with a [`Handler`](crate::prelude::IntoHandler). + /// Receive the replies for this query with a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ``` diff --git a/zenoh/src/api/queryable.rs b/zenoh/src/api/queryable.rs index 7c610bf2b4..566a903bd1 100644 --- a/zenoh/src/api/queryable.rs +++ b/zenoh/src/api/queryable.rs @@ -713,7 +713,7 @@ impl<'a, 'b> QueryableBuilder<'a, 'b, DefaultHandler> { self.callback(locked(callback)) } - /// Receive the queries for this Queryable with a [`Handler`](crate::prelude::IntoHandler). + /// Receive the queries for this Queryable with a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ```no_run @@ -771,10 +771,10 @@ impl<'a, 'b, Handler> QueryableBuilder<'a, 'b, Handler> { } } -/// A queryable that provides data through a [`Handler`](crate::prelude::IntoHandler). +/// A queryable that provides data through a [`Handler`](crate::handlers::IntoHandler). /// -/// Queryables can be created from a zenoh [`Session`] -/// with the [`declare_queryable`](crate::Session::declare_queryable) function +/// Queryables can be created from a zenoh [`Session`](crate::Session) +/// with the [`declare_queryable`](crate::session::SessionDeclarations::declare_queryable) function /// and the [`with`](QueryableBuilder::with) function /// of the resulting builder. /// diff --git a/zenoh/src/api/scouting.rs b/zenoh/src/api/scouting.rs index 59b3d0dfcb..4f08530533 100644 --- a/zenoh/src/api/scouting.rs +++ b/zenoh/src/api/scouting.rs @@ -116,7 +116,7 @@ impl ScoutBuilder { self.callback(locked(callback)) } - /// Receive the [`Hello`] messages from this scout with a [`Handler`](crate::prelude::IntoHandler). + /// Receive the [`Hello`] messages from this scout with a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ```no_run @@ -238,7 +238,7 @@ impl fmt::Debug for ScoutInner { } } -/// A scout that returns [`Hello`] messages through a [`Handler`](crate::prelude::IntoHandler). +/// A scout that returns [`Hello`] messages through a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ```no_run @@ -348,12 +348,12 @@ fn _scout( /// /// [`scout`] spawns a task that periodically sends scout messages and waits for [`Hello`](crate::scouting::Hello) replies. /// -/// Drop the returned [`Scout`](crate::scouting::Scout) to stop the scouting task. +/// Drop the returned [`Scout`] to stop the scouting task. /// /// # Arguments /// /// * `what` - The kind of zenoh process to scout for -/// * `config` - The configuration [`Config`] to use for scouting +/// * `config` - The configuration [`crate::Config`] to use for scouting /// /// # Examples /// ```no_run diff --git a/zenoh/src/api/selector.rs b/zenoh/src/api/selector.rs index e328761cb5..813ae0528d 100644 --- a/zenoh/src/api/selector.rs +++ b/zenoh/src/api/selector.rs @@ -24,7 +24,7 @@ use ::{zenoh_result::ZResult, zenoh_util::time_range::TimeRange}; use super::{key_expr::KeyExpr, queryable::Query}; -/// A selector is the combination of a [Key Expression](crate::prelude::KeyExpr), which defines the +/// A selector is the combination of a [Key Expression](crate::key_expr::KeyExpr), which defines the /// set of keys that are relevant to an operation, and a set of parameters /// with a few intendend uses: /// - specifying arguments to a queryable, allowing the passing of Remote Procedure Call parameters diff --git a/zenoh/src/api/session.rs b/zenoh/src/api/session.rs index 0d50fb9a38..893f4725d5 100644 --- a/zenoh/src/api/session.rs +++ b/zenoh/src/api/session.rs @@ -514,8 +514,8 @@ impl Session { /// pointer to it (`Arc`). This is equivalent to `Arc::new(session)`. /// /// This is useful to share ownership of the `Session` between several threads - /// and tasks. It also allows to create [`Subscriber`](Subscriber) and - /// [`Queryable`](Queryable) with static lifetime that can be moved to several + /// and tasks. It also allows to create [`Subscriber`](crate::subscriber::Subscriber) and + /// [`Queryable`](crate::queryable::Queryable) with static lifetime that can be moved to several /// threads and tasks /// /// Note: the given zenoh `Session` will be closed when the last reference to @@ -547,7 +547,7 @@ impl Session { /// the program's life. Dropping the returned reference will cause a memory /// leak. /// - /// This is useful to move entities (like [`Subscriber`](Subscriber)) which + /// This is useful to move entities (like [`Subscriber`](crate::subscriber::Subscriber)) which /// lifetimes are bound to the session lifetime in several threads or tasks. /// /// Note: the given zenoh `Session` cannot be closed any more. At process @@ -862,7 +862,7 @@ impl Session { } /// Query data from the matching queryables in the system. /// - /// Unless explicitly requested via [`GetBuilder::accept_replies`], replies are guaranteed to have + /// Unless explicitly requested via [`accept_replies`](crate::session::SessionGetBuilder::accept_replies), replies are guaranteed to have /// key expressions that match the requested `selector`. /// /// # Arguments @@ -1978,7 +1978,7 @@ impl Session { } impl<'s> SessionDeclarations<'s, 'static> for Arc { - /// Create a [`Subscriber`](Subscriber) for the given key expression. + /// Create a [`Subscriber`](crate::subscriber::Subscriber) for the given key expression. /// /// # Arguments /// @@ -2018,12 +2018,12 @@ impl<'s> SessionDeclarations<'s, 'static> for Arc { } } - /// Create a [`Queryable`](Queryable) for the given key expression. + /// Create a [`Queryable`](crate::queryable::Queryable) for the given key expression. /// /// # Arguments /// /// * `key_expr` - The key expression matching the queries the - /// [`Queryable`](Queryable) will reply to + /// [`Queryable`](crate::queryable::Queryable) will reply to /// /// # Examples /// ```no_run @@ -2622,7 +2622,7 @@ impl fmt::Debug for Session { /// [`Queryable`](crate::queryable::Queryable) /// /// This trait is implemented by [`Session`](crate::session::Session) itself and -/// by wrappers [`SessionRef`](crate::session::SessionRef) and [`Arc`](crate::session::Arc) +/// by wrappers [`SessionRef`](crate::session::SessionRef) and [`Arc`](std::sync::Arc) /// /// # Examples /// ```no_run diff --git a/zenoh/src/api/subscriber.rs b/zenoh/src/api/subscriber.rs index 79b4429876..f3c1fa14e7 100644 --- a/zenoh/src/api/subscriber.rs +++ b/zenoh/src/api/subscriber.rs @@ -285,7 +285,7 @@ impl<'a, 'b> SubscriberBuilder<'a, 'b, DefaultHandler> { self.callback(locked(callback)) } - /// Receive the samples for this subscription with a [`Handler`](crate::prelude::IntoHandler). + /// Receive the samples for this subscription with a [`Handler`](crate::handlers::IntoHandler). /// /// # Examples /// ```no_run @@ -410,10 +410,10 @@ where } } -/// A subscriber that provides data through a [`Handler`](crate::prelude::IntoHandler). +/// A subscriber that provides data through a [`Handler`](crate::handlers::IntoHandler). /// /// Subscribers can be created from a zenoh [`Session`](crate::Session) -/// with the [`declare_subscriber`](crate::SessionDeclarations::declare_subscriber) function +/// with the [`declare_subscriber`](crate::session::SessionDeclarations::declare_subscriber) function /// and the [`with`](SubscriberBuilder::with) function /// of the resulting builder. /// diff --git a/zenoh/src/lib.rs b/zenoh/src/lib.rs index 7299453f54..1a01ff922d 100644 --- a/zenoh/src/lib.rs +++ b/zenoh/src/lib.rs @@ -148,27 +148,27 @@ pub mod core { /// /// # Storing Key Expressions /// This module provides 3 flavours to store strings that have been validated to respect the KE syntax: -/// - [`keyexpr`] is the equivalent of a [`str`], -/// - [`OwnedKeyExpr`] works like an [`std::sync::Arc`], -/// - [`KeyExpr`] works like a [`std::borrow::Cow`], but also stores some additional context internal to Zenoh to optimize +/// - [`keyexpr`](crate::key_expr::keyexpr) is the equivalent of a [`str`], +/// - [`OwnedKeyExpr`](crate::key_expr::OwnedKeyExpr) works like an [`std::sync::Arc`], +/// - [`KeyExpr`](crate::key_expr::KeyExpr) works like a [`std::borrow::Cow`], but also stores some additional context internal to Zenoh to optimize /// routing and network usage. /// -/// All of these types [`Deref`](core::ops::Deref) to [`keyexpr`], which notably has methods to check whether a given [`keyexpr::intersects`] with another, -/// or even if a [`keyexpr::includes`] another. +/// All of these types [`Deref`](std::ops::Deref) to [`keyexpr`](crate::key_expr::keyexpr), which notably has methods to check whether a given [`intersects`](crate::key_expr::keyexpr::includes) with another, +/// or even if a [`includes`](crate::key_expr::keyexpr::includes) another. /// /// # Tying values to Key Expressions /// When storing values tied to Key Expressions, you might want something more specialized than a [`HashMap`](std::collections::HashMap) if you want to respect /// the Key Expression semantics with high performance. /// -/// Enter [KeTrees](keyexpr_tree). These are data-structures specially built to store KE-value pairs in a manner that supports the set-semantics of KEs. +/// Enter [KeTrees](crate::key_expr::keyexpr_tree). These are data-structures specially built to store KE-value pairs in a manner that supports the set-semantics of KEs. /// /// # Building and parsing Key Expressions /// A common issue in REST API is the association of meaning to sections of the URL, and respecting that API in a convenient manner. -/// The same issue arises naturally when designing a KE space, and [`KeFormat`](format::KeFormat) was designed to help you with this, +/// The same issue arises naturally when designing a KE space, and [`KeFormat`](crate::key_expr::format::KeFormat) was designed to help you with this, /// both in constructing and in parsing KEs that fit the formats you've defined. /// -/// [`kedefine`] also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, -/// as the [`keformat`] and [`kewrite`] macros will be able to tell you if you're attempting to set fields of the format that do not exist. +/// [`kedefine`](crate::key_expr::format::kedefine) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats, +/// as the [`keformat`](crate::key_expr::format::keformat) and [`kewrite`](crate::key_expr::format::kewrite) macros will be able to tell you if you're attempting to set fields of the format that do not exist. pub mod key_expr { #[zenoh_macros::unstable] pub mod keyexpr_tree { @@ -194,7 +194,7 @@ pub mod key_expr { } } -/// Zenoh [`Session`](crate::session::Session) and associated types +/// Zenoh [`Session`] and associated types pub mod session { #[zenoh_macros::internal] pub use crate::api::session::{init, InitBuilder}; @@ -205,7 +205,7 @@ pub mod session { }; } -/// Tools to access information about the current zenoh [`Session`](crate::Session). +/// Tools to access information about the current zenoh [`Session`]. pub mod info { pub use zenoh_config::wrappers::{EntityGlobalId, ZenohId}; pub use zenoh_protocol::core::EntityId; @@ -393,7 +393,7 @@ pub mod time { pub use crate::api::time::new_timestamp; } -/// Configuration to pass to [`open`](crate::session::open) and [`scout`](crate::scouting::scout) functions and associated constants +/// Configuration to pass to [`open`] and [`scout`] functions and associated constants pub mod config { // pub use zenoh_config::{ // client, default, peer, Config, EndPoint, Locator, ModeDependentValue, PermissionsConf, diff --git a/zenohd/src/main.rs b/zenohd/src/main.rs index bf7f4841a1..81ca715f44 100644 --- a/zenohd/src/main.rs +++ b/zenohd/src/main.rs @@ -56,7 +56,7 @@ struct Args { /// WARNING: this identifier must be unique in the system and must be 16 bytes maximum (32 chars)! #[arg(short, long)] id: Option, - /// A plugin that MUST be loaded. You can give just the name of the plugin, zenohd will search for a library named 'libzenoh_plugin_.so' (exact name depending the OS). Or you can give such a string: ": + /// A plugin that MUST be loaded. You can give just the name of the plugin, zenohd will search for a library named 'libzenoh_plugin_\.so' (exact name depending the OS). Or you can give such a string: "\:\" /// Repeat this option to load several plugins. If loading failed, zenohd will exit. #[arg(short = 'P', long)] plugin: Vec,