pub enum Observed {
Nothing,
Value(RefTarget),
Unreadable(String),
}Expand description
What was actually there — including the case where something was there and could not be decoded.
Restored from gunnar-store’s deleted Error type, and the three-state is
the point. The two call sites that produce it in the gix arm used to write
from_gix_target(actual).ok(), which turned a reference that existed and
could not be read into None — reported to the pushing client as “nothing
was there”. A backend that reports no observed value for a rejection
answers Observed::Nothing, which is “the honest answer rather than a
dropped one”, and a backend that found bytes it could not parse answers
Observed::Unreadable. Collapsing those two is the defect this enum
exists to make impossible.
Variants§
Nothing
The ref did not exist.
Value(RefTarget)
It existed and held this.
Unreadable(String)
It existed, and the backend could not decode what it held.