diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-12 08:28:04 +0000 |
| commit | 54894f9de9bad4fecb2a116d59a03cdd003f84c0 (patch) | |
| tree | 6ce5517cecf23d4e93d7a381a374e1fa6c810cee /schist_traits/src | |
| parent | 8a30bcbdf9264d235bf93da3df8e170cfde53d02 (diff) | |
Moves rust workspace to root
Diffstat (limited to 'schist_traits/src')
| -rw-r--r-- | schist_traits/src/dateable.rs | 5 | ||||
| -rw-r--r-- | schist_traits/src/lib.rs | 3 | ||||
| -rw-r--r-- | schist_traits/src/nowlike.rs | 3 | ||||
| -rw-r--r-- | schist_traits/src/timeable.rs | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/schist_traits/src/dateable.rs b/schist_traits/src/dateable.rs new file mode 100644 index 0000000..05f2d74 --- /dev/null +++ b/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_traits/src/lib.rs b/schist_traits/src/lib.rs new file mode 100644 index 0000000..ab5caca --- /dev/null +++ b/schist_traits/src/lib.rs @@ -0,0 +1,3 @@ +pub mod dateable; +pub mod nowlike; +pub mod timeable; diff --git a/schist_traits/src/nowlike.rs b/schist_traits/src/nowlike.rs new file mode 100644 index 0000000..bae2309 --- /dev/null +++ b/schist_traits/src/nowlike.rs @@ -0,0 +1,3 @@ +pub trait Nowlike { + fn now() -> Self; +} diff --git a/schist_traits/src/timeable.rs b/schist_traits/src/timeable.rs new file mode 100644 index 0000000..f6f9244 --- /dev/null +++ b/schist_traits/src/timeable.rs @@ -0,0 +1,5 @@ +pub trait Timeable { + fn hour(&self) -> u32; + fn minute(&self) -> u32; + fn second(&self) -> u32; +} |
