[][src]Module repository::prealloc_tx

Transaction for Repo that supports preallocation.

With PreallocTx, EntityPtrs can be preallocated before the actual data is ready to be inserted into the Repo.

Preallocated EntityPtrs are created using PreallocTx::preallocate and initialized with PreallocTx::init_preallocation. If the EntityPtr is not initialized, the preallocation will be cancelled when PreallocTx is dropped, as if PreallocTx::cancel_preallocation is called.

This is especially useful for building data structures with circular references but without the ability to represent the intermediate invalid state during construction.

Structs

PreallocTx

Transaction for Repo that supports preallocation.

Enums

PreallocTxError

Errors for PreallocTxError operations.