(&self)
| 107 | } |
| 108 | |
| 109 | fn has_vault(&self) -> PristineResult<bool> { |
| 110 | let table = match self.txn.open_table(VAULT_MANIFEST) { |
| 111 | Ok(table) => table, |
| 112 | Err(redb::TableError::TableDoesNotExist(_)) => return Ok(false), |
| 113 | Err(e) => return Err(PristineError::from(e)), |
| 114 | }; |
| 115 | |
| 116 | let result = match table.get("manifest")? { |
| 117 | Some(_) => Ok(true), |
| 118 | None => Ok(false), |
| 119 | }; |
| 120 | result |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | impl<'a> VaultMutTxnT for WriteTxn<'a> { |