| 1 | use std::ops::Range; |
| 2 | |
| 3 | use bytes::Bytes; |
| 4 | |
| 5 | #[derive(Debug)] |
| 6 | pub(crate) struct Row { |
| 7 | pub(crate) storage: Bytes, |
| 8 | pub(crate) values: Vec<Option<Range<usize>>>, |
| 9 | } |
| 10 | |
| 11 | impl Row { |
| 12 | pub(crate) fn get(&self, index: usize) -> Option<&[u8]> { |
| 13 | self.values[index].clone().map(|col| &self.storage[col]) |
| 14 | } |
| 15 | } |