DatabaseEntry currently only provides methods taking self. This means the DatabaseEntry moves and cannot be used afterwards.
Sometimes, you'd like to keep the structure around though and just get a handle on the contained document. We should also provide an implementation returning a reference to the internal document, if there is one.
A mutable reference should not be provided, as then, the inner doc should be unwrapped at submitted back to the database.
DatabaseEntry currently only provides methods taking
self
. This means the DatabaseEntry moves and cannot be used afterwards.Sometimes, you'd like to keep the structure around though and just get a handle on the contained document. We should also provide an implementation returning a reference to the internal document, if there is one.
A mutable reference should not be provided, as then, the inner doc should be unwrapped at submitted back to the database.