diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-28 13:22:53 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-28 13:30:27 +0100 |
| commit | 2361adeb0ca77904138e3466d51c2f44cf6df613 (patch) | |
| tree | f6e7192908f99fab62061913d8a1e9d2b918414b /schist_core/schist_traits | |
| parent | c7ed1e61ce2218be0b9e60577454124c4e43a366 (diff) | |
Tidier folders
Diffstat (limited to 'schist_core/schist_traits')
| -rw-r--r-- | schist_core/schist_traits/Cargo.toml | 4 | ||||
| -rw-r--r-- | schist_core/schist_traits/src/dateable.rs | 5 | ||||
| -rw-r--r-- | schist_core/schist_traits/src/lib.rs | 3 | ||||
| -rw-r--r-- | schist_core/schist_traits/src/nowlike.rs | 3 | ||||
| -rw-r--r-- | schist_core/schist_traits/src/timeable.rs | 5 |
5 files changed, 20 insertions, 0 deletions
diff --git a/schist_core/schist_traits/Cargo.toml b/schist_core/schist_traits/Cargo.toml new file mode 100644 index 0000000..1515eda --- /dev/null +++ b/schist_core/schist_traits/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "schist_traits" +version = "0.1.0" +edition = "2021" diff --git a/schist_core/schist_traits/src/dateable.rs b/schist_core/schist_traits/src/dateable.rs new file mode 100644 index 0000000..05f2d74 --- /dev/null +++ b/schist_core/schist_traits/src/dateable.rs @@ -0,0 +1,5 @@ +pub trait Dateable { + fn year(&self) -> i32; + fn month(&self) -> u32; + fn day(&self) -> u32; +} diff --git a/schist_core/schist_traits/src/lib.rs b/schist_core/schist_traits/src/lib.rs new file mode 100644 index 0000000..ab5caca --- /dev/null +++ b/schist_core/schist_traits/src/lib.rs @@ -0,0 +1,3 @@ +pub mod dateable; +pub mod nowlike; +pub mod timeable; diff --git a/schist_core/schist_traits/src/nowlike.rs b/schist_core/schist_traits/src/nowlike.rs new file mode 100644 index 0000000..bae2309 --- /dev/null +++ b/schist_core/schist_traits/src/nowlike.rs @@ -0,0 +1,3 @@ +pub trait Nowlike { + fn now() -> Self; +} diff --git a/schist_core/schist_traits/src/timeable.rs b/schist_core/schist_traits/src/timeable.rs new file mode 100644 index 0000000..f6f9244 --- /dev/null +++ b/schist_core/schist_traits/src/timeable.rs @@ -0,0 +1,5 @@ +pub trait Timeable { + fn hour(&self) -> u32; + fn minute(&self) -> u32; + fn second(&self) -> u32; +} |
