[−][src]Module repository::prealloc_tx
Transaction for Repo
that supports preallocation.
With PreallocTx
, EntityPtr
s can be preallocated before the actual data
is ready to be inserted into the Repo
.
Preallocated EntityPtr
s 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 |
Enums
PreallocTxError | Errors for |