From 89ee33180925617841d129bd0e2ba8d1d93b98a9 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Quiros Date: Fri, 7 Oct 2022 11:51:35 +0200 Subject: [PATCH] WakuHandle docs --- waku/src/node/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/waku/src/node/mod.rs b/waku/src/node/mod.rs index 89d0c9c..175b0db 100644 --- a/waku/src/node/mod.rs +++ b/waku/src/node/mod.rs @@ -36,6 +36,11 @@ pub struct Running; impl WakuNodeState for Initialized {} impl WakuNodeState for Running {} +/// Handle to the underliying waku node +/// Safe to sendt to/through threads. +/// Only a waku node can be running at a time. +/// Referenes (`&`) to the handle can call queries and perform operations in a thread safe way. +/// Only an owned version of the handle can `start` or `stop` the node. pub struct WakuNodeHandle(PhantomData); /// We do not have any inner state, so the handle should be safe to be send among threads.