From 66ce3d3e741634ef0601a37920482d6d689d7e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Tue, 12 Mar 2024 12:15:21 +0800 Subject: [PATCH] Doc: Add doc to pub sub-mod --- openraft/src/async_runtime.rs | 4 ++++ openraft/src/entry/mod.rs | 2 ++ openraft/src/instant.rs | 2 ++ openraft/src/lib.rs | 4 ++-- openraft/src/testing/mod.rs | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/openraft/src/async_runtime.rs b/openraft/src/async_runtime.rs index c602d48a7..9c7f48174 100644 --- a/openraft/src/async_runtime.rs +++ b/openraft/src/async_runtime.rs @@ -1,3 +1,7 @@ +//! `async` runtime interface. +//! +//! `async` runtime is an abstraction over different asynchronous runtimes, such as `tokio`, +//! `async-std`, etc. use std::fmt::Debug; use std::fmt::Display; use std::future::Future; diff --git a/openraft/src/entry/mod.rs b/openraft/src/entry/mod.rs index f64b3f042..f4cbecabf 100644 --- a/openraft/src/entry/mod.rs +++ b/openraft/src/entry/mod.rs @@ -1,3 +1,5 @@ +//! The default log entry type that implements [`RaftEntry`]. + use std::fmt; use std::fmt::Debug; diff --git a/openraft/src/instant.rs b/openraft/src/instant.rs index 66d0ebc65..27c4481d2 100644 --- a/openraft/src/instant.rs +++ b/openraft/src/instant.rs @@ -1,3 +1,5 @@ +//! A trait for time instants. + use std::fmt::Debug; use std::ops::Add; use std::ops::AddAssign; diff --git a/openraft/src/lib.rs b/openraft/src/lib.rs index cc82c81b7..7e1ccb858 100644 --- a/openraft/src/lib.rs +++ b/openraft/src/lib.rs @@ -48,11 +48,11 @@ pub mod network; pub mod raft; pub mod storage; pub mod testing; -pub mod timer; -pub mod type_config; pub(crate) mod engine; pub(crate) mod log_id_range; +pub(crate) mod timer; +pub(crate) mod type_config; pub(crate) mod utime; mod display_ext; diff --git a/openraft/src/testing/mod.rs b/openraft/src/testing/mod.rs index 4288554fb..8d2ffc77c 100644 --- a/openraft/src/testing/mod.rs +++ b/openraft/src/testing/mod.rs @@ -1,3 +1,5 @@ +//! Testing utilities for OpenRaft. + mod store_builder; mod suite;