Skip to content

Commit 7392f06

Browse files
committed
Refine core docs
1 parent a08a8c3 commit 7392f06

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

nautilus_core/core/src/correctness.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
// limitations under the License.
1414
// -------------------------------------------------------------------------------------------------
1515

16-
//! Functions for condition checks similar to the *design by contract* philosophy
17-
//! to ensure logical correctness.
16+
//! Functions for correctness checks similar to the *design by contract* philosophy.
1817
//!
1918
//! This module provides validation checking of function or method conditions.
2019
//!

nautilus_core/core/src/paths.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// limitations under the License.
1414
// -------------------------------------------------------------------------------------------------
1515

16+
//! Utility functions for resolving project and workspace directory paths.
17+
1618
use std::path::PathBuf;
1719

1820
/// Returns the workspace root directory path.

nautilus_core/core/src/time.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ pub fn nanos_since_unix_epoch() -> u64 {
8080

8181
/// Represents an atomic timekeeping structure.
8282
///
83-
/// `AtomicTime` can act as a real-time clock or static clock based on its mode.
84-
/// It uses `AtomicU64` to atomically update the value using only immutable
83+
/// [`AtomicTime`] can act as a real-time clock or static clock based on its mode.
84+
/// It uses an [`AtomicU64`] to atomically update the value using only immutable
8585
/// references.
8686
///
8787
/// This struct provides thread-safe access to a stored nanosecond time value,
@@ -128,8 +128,8 @@ impl AtomicTime {
128128
/// Get time in nanoseconds.
129129
///
130130
/// - **Real-time mode**: Returns the current wall clock time since the UNIX epoch,
131-
/// ensuring monotonicity across threads using `Ordering::SeqCst`.
132-
/// - **Static mode**: Returns the currently stored time, which uses `Ordering::Relaxed`
131+
/// ensuring monotonicity across threads using [`Ordering::SeqCst`].
132+
/// - **Static mode**: Returns the currently stored time, which uses [`Ordering::Relaxed`]
133133
/// and is suitable for single-threaded scenarios where strict synchronization is unnecessary.
134134
#[must_use]
135135
pub fn get_time_ns(&self) -> UnixNanos {
@@ -159,23 +159,23 @@ impl AtomicTime {
159159

160160
/// Sets new time for the clock.
161161
///
162-
/// Intended for single-threaded use, as it relies on `Ordering::Relaxed` and
162+
/// Intended for single-threaded use, as it relies on [`Ordering::Relaxed`] and
163163
/// does not enforce strict synchronization.
164164
pub fn set_time(&self, time: UnixNanos) {
165165
self.store(time.into(), Ordering::Relaxed);
166166
}
167167

168168
/// Increments the current time by the specified delta and returns the updated value.
169169
///
170-
/// Intended for single-threaded use, as it relies on `Ordering::Relaxed` and
170+
/// Intended for single-threaded use, as it relies on [`Ordering::Relaxed`] and
171171
/// does not enforce strict synchronization.
172172
pub fn increment_time(&self, delta: u64) -> UnixNanos {
173173
UnixNanos::from(self.fetch_add(delta, Ordering::Relaxed) + delta)
174174
}
175175

176176
/// Stores and returns current time.
177177
///
178-
/// This method uses `Ordering::SeqCst` (Sequential Consistency) ordering to ensure that:
178+
/// This method uses [`Ordering::SeqCst`] (Sequential Consistency) ordering to ensure that:
179179
/// 1. Timestamps are monotonically increasing and thread-safe.
180180
/// 2. The returned timestamp is never less than the current system time.
181181
/// 3. Each timestamp is at least 1 nanosecond greater than the last stored value.
@@ -195,14 +195,14 @@ impl AtomicTime {
195195

196196
/// Switches the clock to real-time mode.
197197
///
198-
/// Intended for single-threaded use, as it uses `Ordering::Relaxed` for updating the mode.
198+
/// Intended for single-threaded use, as it uses [`Ordering::Relaxed`] for updating the mode.
199199
pub fn make_realtime(&self) {
200200
self.realtime.store(true, Ordering::Relaxed);
201201
}
202202

203203
/// Switches the clock to static mode.
204204
///
205-
/// Intended for single-threaded use, as it uses `Ordering::Relaxed` for updating the mode.
205+
/// Intended for single-threaded use, as it uses [`Ordering::Relaxed`] for updating the mode.
206206
pub fn make_static(&self) {
207207
self.realtime.store(false, Ordering::Relaxed);
208208
}

nautilus_core/core/src/uuid.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
// limitations under the License.
1414
// -------------------------------------------------------------------------------------------------
1515

16-
//! A `UUID4` universally unique identifier (UUID) version 4 based on a 128-bit
17-
//! label (RFC 4122).
16+
//! A `UUID4` universally unique identifier (UUID) version 4 (RFC 4122).
1817
1918
use std::{
2019
ffi::CStr,

0 commit comments

Comments
 (0)