MergeOperator returns result type
Use Case:
Merges that can fail would be really useful- for example, I'm doing some deserialization of the ivecs before the merge which can fail.
Proposed Change:
have it return Result<Option<Vec
Who Benefits From The Change(s)?
Anyone that's doing merges that might not succeed, which i'd bet is a lot of people. sled's design seems to encourage having a parsing layer on top of storage- you have to store vecs of u8s... It seems weird not to have this be a result type.
Alternative Approaches
store some "failure" data in the db and then do a read to check whether it failed and then handle the situation in there... very ugly.
just use regular logic around regular database transaction :( but this merge functionality is so nice!
one second, filling this out, my pinkie is messed up and i accidentally hit enter...
post-issue-writing edit: owie ouch. sorry for all the short phrases, i only have 3.5 fingers functioning properly on my right hand right now :| hope everything made sense