Get the list as a slice.
(&self, pool: &'a ListPool<T>)
| 311 | |
| 312 | /// Get the list as a slice. |
| 313 | pub fn as_slice<'a>(&self, pool: &'a ListPool<T>) -> &'a [T] { |
| 314 | let idx = self.index as usize; |
| 315 | match pool.len_of(self) { |
| 316 | None => &[], |
| 317 | Some(len) => &pool.data[idx..idx + len], |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | /// Get a single element from the list. |
| 322 | pub fn get(&self, index: usize, pool: &ListPool<T>) -> Option<T> { |
no test coverage detected