automerge/automerge
Alex Good dbf438f7cb
Track whether a transaction is observed in types
With the `OpObserver` moving to the transaction rather than being passed
in to the `Transaction::commit` method we have needed to add a way to
get the observer back out of the transaction (via
`Transaction::observer` and `AutoCommit::observer`). This `Observer`
type is then used to handle patch generation logic. However, there are
cases where we might not want an `OpObserver` and in these cases we can
execute various things fast - so we need to have something like an
`Option<OpObserver>`. In order to track the presence or otherwise of the
observer at the type level introduce
`automerge::transaction::observation`, which is a type level `Option`.
This allows us to efficiently choose the right code paths whilst
maintaining correct types for `Transaction::observer` and
`AutoCommit::observer`
2022-10-06 22:38:37 +01:00
..
benches Appease clippy 2022-09-28 17:18:37 -05:00
examples Track whether a transaction is observed in types 2022-10-06 22:38:37 +01:00
src Track whether a transaction is observed in types 2022-10-06 22:38:37 +01:00
tests The patch interface needs an accurate path per patch op 2022-10-04 18:15:49 +01:00
.gitignore init 2021-08-30 14:09:14 -04:00
Cargo.toml Add readme field to automerge/Cargo.toml 2022-09-01 12:27:34 +01:00