aboutsummaryrefslogtreecommitdiff
path: root/src/grid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs
index d8b701b9..07255cb4 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -24,10 +24,16 @@ use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::iter::IntoIterator;
use std::ops::{Deref, DerefMut, Range, RangeTo, RangeFrom, RangeFull, Index, IndexMut};
+use std::ops::RangeInclusive;
use std::slice::{self, Iter, IterMut};
use index::{self, Cursor};
+/// Convert a type to a linear index range.
+pub trait ToRange {
+ fn to_range(&self, columns: index::Column) -> RangeInclusive<index::Linear>;
+}
+
/// Represents the terminal display contents
#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
pub struct Grid<T> {