#[non_exhaustive]pub enum Defect {
ReadTruncates,
KeysFoldCase,
WriteIsLost,
DeleteIsIgnored,
StatLiesAboutLength,
ListIsDescending,
ListPrefixIsPattern,
ListIgnoresPaging,
CreateNotExclusive,
AppendOverwrites,
AppendTearsRecords,
ReplaceTearsReads,
}Expand description
A deliberate fault, for the known-bad control of a contract test.
A test that cannot fail proves nothing; each variant breaks exactly one leaf’s contract.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReadTruncates
read drops the last byte.
KeysFoldCase
Keys that differ only in letter case are the same key (a case-insensitive filesystem).
WriteIsLost
write is acknowledged and not stored.
DeleteIsIgnored
delete is acknowledged and the key stays.
StatLiesAboutLength
stat reports a length one too long.
ListIsDescending
list returns keys in descending order.
ListPrefixIsPattern
list treats % and [ in the prefix as pattern characters, not literals.
ListIgnoresPaging
list ignores limit and after.
CreateNotExclusive
create_exclusive checks, lets other callers run, then writes: two callers can both win.
AppendOverwrites
append replaces the value instead of adding to it.
AppendTearsRecords
append adds its first half, lets others run, then the rest: concurrent records interleave.
ReplaceTearsReads
replace_atomic writes the first half, lets readers run, then the rest: a reader can see a
mix of old and new.