diff options
| author | Joe Carstairs <me@joeac.net> | 2026-01-25 10:10:24 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-01-25 10:10:24 +0000 |
| commit | 1feae160bd184dcea618415c0e9e55289ca8b68a (patch) | |
| tree | 1cbbedd744468df30fa346bce4eeba9a60f42565 /schist_desktop_gui/src/traits | |
| parent | d2fccfb4fe073eefc235595d255fcb6385bfa1f1 (diff) | |
factors out navigable trait
Diffstat (limited to 'schist_desktop_gui/src/traits')
| -rw-r--r-- | schist_desktop_gui/src/traits/navigable.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/schist_desktop_gui/src/traits/navigable.rs b/schist_desktop_gui/src/traits/navigable.rs new file mode 100644 index 0000000..2693230 --- /dev/null +++ b/schist_desktop_gui/src/traits/navigable.rs @@ -0,0 +1,9 @@ +pub trait Navigable<Option> { + fn move_next(&mut self) -> NavigationResult<Option>; + fn move_prev(&mut self) -> NavigationResult<Option>; +} + +pub enum NavigationResult<Option> { + Moved(Option), + LastOption, +} |
