File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 4
4
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5
5
// Please see LICENSE files in the repository root for full details.
6
6
7
+ //!
8
+ //! This crate defines a [`Clock`] trait that can be used to abstract the
9
+ //! way the current time is retrieved. It has two implementation:
10
+ //! [`SystemClock`] that uses the system time and [`MockClock`] which is useful
11
+ //! for testing.
12
+ //!
13
+ //! [`MockClock`]: crate::clock::MockClock
14
+ //!
15
+
7
16
#![ allow( clippy:: module_name_repetitions) ]
8
17
9
18
use thiserror:: Error ;
Original file line number Diff line number Diff line change 15
15
//! without caring about the underlying storage backend, and without carrying
16
16
//! around the generic type parameter.
17
17
//!
18
- //! This crate also defines a [`Clock`] trait that can be used to abstract the
19
- //! way the current time is retrieved. It has two implementation:
20
- //! [`SystemClock`] that uses the system time and [`MockClock`] which is useful
21
- //! for testing.
22
- //!
23
- //! [`MockClock`]: mas_data_model::clock::MockClock
24
- //!
25
18
//! # Defining a new repository
26
19
//!
27
20
//! To define a new repository, you have to:
86
79
//! and use that error type
87
80
//! 2. Lookups return an `Result<Option<T>, Self::Error>`, because 'not found'
88
81
//! errors are usually cases that are handled differently
89
- //! 3. Operations that need to record the current type use a [`Clock`]
82
+ //! 3. Operations that need to record the current type use a [`mas_data_model:: Clock`]
90
83
//! parameter. Operations that need to generate new IDs also use a random
91
84
//! number generator.
92
85
//! 4. All the methods use an `&mut self`. This is ensures only one operation
You can’t perform that action at this time.
0 commit comments