| 756 | } |
| 757 | |
| 758 | fn list_working_copies(&self) -> PristineResult<Vec<WorkingCopyRecord>> { |
| 759 | let table = match self.txn.open_table(WORKING_COPIES) { |
| 760 | Ok(table) => table, |
| 761 | Err(redb::TableError::TableDoesNotExist(_)) => { |
| 762 | return Err(PristineError::WorkingCopySchemaUnavailable); |
| 763 | } |
| 764 | Err(error) => return Err(error.into()), |
| 765 | }; |
| 766 | let mut records = Vec::new(); |
| 767 | for entry in table.iter()? { |
| 768 | let (key, value) = entry?; |
| 769 | records.push(decode_working_copy_row(key.value(), value.value())?); |
| 770 | } |
| 771 | Ok(records) |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | // TreeTxnT Implementation |