diff options
| author | Joe Carstairs <me@joeac.net> | 2024-11-17 09:23:28 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-11-17 09:23:28 +0000 |
| commit | 1ae19eb3315c40e3f9062592c27fa76c11cf626c (patch) | |
| tree | 09d9ce380795971f4b50e1d4b0ca3c57c9e1db1a /rust/core/src/traits | |
| parent | 1a494937021561595d0fb29e26fb707aef9e55de (diff) | |
Renames workspace folder
Diffstat (limited to 'rust/core/src/traits')
| -rw-r--r-- | rust/core/src/traits/dateable.rs | 5 | ||||
| -rw-r--r-- | rust/core/src/traits/mod.rs | 3 | ||||
| -rw-r--r-- | rust/core/src/traits/nowlike.rs | 3 | ||||
| -rw-r--r-- | rust/core/src/traits/timeable.rs | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/rust/core/src/traits/dateable.rs b/rust/core/src/traits/dateable.rs new file mode 100644 index 0000000..05f2d74 --- /dev/null +++ b/rust/core/src/traits/dateable.rs @@ -0,0 +1,5 @@ +pub trait Dateable { + fn year(&self) -> i32; + fn month(&self) -> u32; + fn day(&self) -> u32; +} diff --git a/rust/core/src/traits/mod.rs b/rust/core/src/traits/mod.rs new file mode 100644 index 0000000..ab5caca --- /dev/null +++ b/rust/core/src/traits/mod.rs @@ -0,0 +1,3 @@ +pub mod dateable; +pub mod nowlike; +pub mod timeable; diff --git a/rust/core/src/traits/nowlike.rs b/rust/core/src/traits/nowlike.rs new file mode 100644 index 0000000..bae2309 --- /dev/null +++ b/rust/core/src/traits/nowlike.rs @@ -0,0 +1,3 @@ +pub trait Nowlike { + fn now() -> Self; +} diff --git a/rust/core/src/traits/timeable.rs b/rust/core/src/traits/timeable.rs new file mode 100644 index 0000000..f6f9244 --- /dev/null +++ b/rust/core/src/traits/timeable.rs @@ -0,0 +1,5 @@ +pub trait Timeable { + fn hour(&self) -> u32; + fn minute(&self) -> u32; + fn second(&self) -> u32; +} |
