MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / open_table_for_test

Method open_table_for_test

atomic-core/src/pristine/txn/write/mod.rs:1121–1126  ·  view source on GitHub ↗

Test-only raw table access (corruption seeding for repair tests).

(
        &'t mut self,
        definition: redb::TableDefinition<'static, K, V>,
    )

Source from the content-addressed store, hash-verified

1119impl<'a> WriteTxn<'a> {
1120 /// Test-only raw table access (corruption seeding for repair tests).
1121 pub(crate) fn open_table_for_test<'t, K: redb::Key + 'static, V: redb::Value + 'static>(
1122 &'t mut self,
1123 definition: redb::TableDefinition<'static, K, V>,
1124 ) -> Result<redb::Table<'t, K, V>, redb::TableError> {
1125 self.txn.open_table(definition)
1126 }
1127}
1128
1129// Entity registration helper

Calls

no outgoing calls