aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-11-23 00:08:16 +0300
committerhozan23 <hozan23@proton.me>2023-11-23 00:08:16 +0300
commitf1b78d53d7d0009fdef8f0e220bc0c421288c514 (patch)
tree4e00a6ef8228a25debcaadf8b1e3b5ca4517eeae /core/src
parent52616ee63d77e1847f502c0ac92bead6eaa12ab3 (diff)
general clean ups for the docs
Diffstat (limited to 'core/src')
-rw-r--r--core/src/async_utils/select.rs2
-rw-r--r--core/src/event.rs6
-rw-r--r--core/src/lib.rs7
3 files changed, 8 insertions, 7 deletions
diff --git a/core/src/async_utils/select.rs b/core/src/async_utils/select.rs
index d61b355..9fe3c77 100644
--- a/core/src/async_utils/select.rs
+++ b/core/src/async_utils/select.rs
@@ -42,7 +42,7 @@ pin_project! {
}
}
-/// The return value from the `select` function, indicating which future
+/// The return value from the [`select`] function, indicating which future
/// completed first.
#[derive(Debug)]
pub enum Either<T1, T2> {
diff --git a/core/src/event.rs b/core/src/event.rs
index b856385..0503e88 100644
--- a/core/src/event.rs
+++ b/core/src/event.rs
@@ -169,7 +169,7 @@ where
listener
}
- /// Removes an event listener attached to the given topic.
+ /// Removes the event listener attached to the given topic.
async fn remove(&self, topic: &T, event_id: &str, listener_id: &EventListenerID) {
let topics = &mut self.listeners.lock().await;
if !topics.contains_key(topic) {
@@ -190,7 +190,7 @@ where
}
}
-/// EventListener listens for and receives events from the `EventSys`.
+/// EventListener listens for and receives events from the [`EventSys`].
pub struct EventListener<T, E> {
id: EventListenerID,
recv_chan: Receiver<Event>,
@@ -260,7 +260,7 @@ where
}
}
-/// An event within the `EventSys`.
+/// An event within the [`EventSys`].
#[derive(Clone, Debug)]
pub struct Event {
/// The time at which the event was created.
diff --git a/core/src/lib.rs b/core/src/lib.rs
index fef7459..6c40909 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -1,16 +1,17 @@
/// A set of helper tools and functions.
pub mod utils;
-/// A module containing async utilities that work with the `smol` async runtime.
+/// A module containing async utilities that work with the
+/// [`smol`](https://github.com/smol-rs/smol) async runtime.
pub mod async_utils;
/// Represents karyons's Core Error.
pub mod error;
-/// [`EventSys`](./event/struct.EventSys.html) Implementation
+/// [`event::EventSys`] Implementation
pub mod event;
-/// A simple publish-subscribe system.[`Read More`](./pubsub/struct.Publisher.html)
+/// A simple publish-subscribe system [`Read More`](./pubsub/struct.Publisher.html)
pub mod pubsub;
use smol::Executor as SmolEx;