aboutsummaryrefslogtreecommitdiff
path: root/src/grid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs
index c886807b..1c5b94c4 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -38,6 +38,21 @@ pub trait BidirectionalIterator: Iterator {
fn prev(&mut self) -> Option<Self::Item>;
}
+pub struct Indexed<T> {
+ pub line: Line,
+ pub column: Column,
+ pub inner: T
+}
+
+impl<T> Deref for Indexed<T> {
+ type Target = T;
+
+ #[inline]
+ fn deref(&self) -> &T {
+ &self.inner
+ }
+}
+
/// Represents the terminal display contents
#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub struct Grid<T> {