From f58472059988e3ac20635b62303d320f18884c9f Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Tue, 26 Nov 2024 17:11:41 +0100 Subject: [PATCH] [#528] Update documentation --- iceoryx2/src/node/mod.rs | 8 +++++--- iceoryx2/src/port/waitset.rs | 17 +++++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/iceoryx2/src/node/mod.rs b/iceoryx2/src/node/mod.rs index dba56c8b..954c119c 100644 --- a/iceoryx2/src/node/mod.rs +++ b/iceoryx2/src/node/mod.rs @@ -83,9 +83,11 @@ //! //! ## Simple Event Loop With Disabled [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling //! -//! This example demonstrates how the [`Node`] can be used when another instance is handling -//! system signals. The builder parameter [`NodeBuilder::signal_handling_mode()`] can be used -//! to disable signal handling in all [`Node`] calls like [`Node::wait()`]. +//! This example demonstrates how the [`Node`](crate::node::Node) can be used when another instance is handling +//! system signals. The builder parameter +//! [`NodeBuilder::signal_handling_mode()`](crate::node::NodeBuilder::signal_handling_mode()) can be used +//! to disable signal handling in all [`Node`](crate::node::Node) calls like +//! [`Node::wait()`](crate::node::Node::wait()). //! //! ```no_run //! use core::time::Duration; diff --git a/iceoryx2/src/port/waitset.rs b/iceoryx2/src/port/waitset.rs index ed5ab737..6947ed43 100644 --- a/iceoryx2/src/port/waitset.rs +++ b/iceoryx2/src/port/waitset.rs @@ -185,12 +185,14 @@ //! # } //! ``` //! -//! ## Using [`WaitSet`] Without [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling +//! ## Using [`WaitSet`](crate::port::waitset::WaitSet) Without [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling //! -//! This example demonstrates how the [`WaitSet`] can be used when another instance is handling -//! system signals. The builder parameter [`WaitSetBuilder::signal_handling_mode()`] can be used -//! to disable signal handling in all [`WaitSet`] calls like [`WaitSet::wait_and_process()`] or -//! [`WaitSet::wait_and_process_once()`]. +//! This example demonstrates how the [`WaitSet`](crate::port::waitset::WaitSet) can be used when +//! another instance is handling system signals. The builder parameter +//! [`WaitSetBuilder::signal_handling_mode()`](crate::port::waitset::WaitSetBuilder::signal_handling_mode()) +//! can be used to disable signal handling in all [`WaitSet`](crate::port::waitset::WaitSet) calls +//! like [`WaitSet::wait_and_process()`](crate::port::waitset::WaitSet::wait_and_process()) or +//! [`WaitSet::wait_and_process_once()`](crate::port::waitset::WaitSet::wait_and_process_once()). //! //! ```no_run //! use iceoryx2::prelude::*; @@ -198,7 +200,7 @@ //! # fn main() -> Result<(), Box> { //! //! let waitset = WaitSetBuilder::new() -//! .signal_handling_mode(SignalHandlingMode::Dsiabled) +//! .signal_handling_mode(SignalHandlingMode::Disabled) //! .create::()?; //! //! let on_event = |_| { @@ -207,6 +209,9 @@ //! }; //! //! waitset.wait_and_process(on_event)?; +//! +//! # Ok(()) +//! # } use std::{ cell::RefCell, collections::HashMap, fmt::Debug, hash::Hash, marker::PhantomData,