pub enum Error {
Deserialization,
Serialization,
DuplicateKey,
NeedsFirstRead,
NeedsGarbageCollect,
InvalidState(&'static str, State),
InconsistentFlash,
AlreadyTaken,
NodeInOtherList,
}Expand description
General error that is not specific to the flash implementation
Variants§
Deserialization
Deserializing node from the buffer failed
Serialization
Serializing a node into the buffer failed because the buffer was too small
DuplicateKey
The key already exists in the list
NeedsFirstRead
Recoverable error to tell the caller that the list needs reading first.
NeedsGarbageCollect
Recoverable error to tell the caller that the list needs to process garbage collection before doing writes. In some cases, this might not be necessary, but for now we force it after the first read and after every write to avoid running out of space.
InvalidState(&'static str, State)
Node is in a state that is invalid at the particular point of operation. Contains a tuple of the node key and the state that was deemed invalid.
InconsistentFlash
The flash returned inconsistent data between iterations. This is likely fatal.
AlreadyTaken
Tried to create a Node Handle when one already exists for a given node
NodeInOtherList
Node exists in another list already and needs to be detached