diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2025-06-10 18:32:54 +0900 |
---|---|---|
committer | Andreas Hindborg <a.hindborg@kernel.org> | 2025-06-16 15:01:37 +0200 |
commit | 1664a671be46a0b0daf5250eb124d94a5501a64c (patch) | |
tree | 25bb29707b46024c185ca5ad2a4d5db4fe2325b1 /rust/helpers | |
parent | 1b7bbd5975279a1cf8d907fbc719f350031194c2 (diff) |
rust: time: Replace ClockId enum with ClockSource trait
Replace the ClockId enum with a trait-based abstraction called
ClockSource. This change enables expressing clock sources as types and
leveraging the Rust type system to enforce clock correctness at
compile time.
This also sets the stage for future generic abstractions over Instant
types such as Instant<C>.
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://lore.kernel.org/r/20250610093258.3435874-2-fujita.tomonori@gmail.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions