Returns `true` if the list is valid
(&self, pool: &ListPool<T>)
| 305 | |
| 306 | /// Returns `true` if the list is valid |
| 307 | pub fn is_valid(&self, pool: &ListPool<T>) -> bool { |
| 308 | // We consider an empty list to be valid |
| 309 | self.is_empty() || pool.len_of(self) != None |
| 310 | } |
| 311 | |
| 312 | /// Get the list as a slice. |
| 313 | pub fn as_slice<'a>(&self, pool: &'a ListPool<T>) -> &'a [T] { |