AppError::downcast is documented as a stub and downcast_mut is documented as functional, but both unconditionally fail (introspection.rs): downcast always returns Err(self), downcast_mut always returns None. Only is/downcast_ref work (and they inspect the source, not the error itself).
anyhow provides full by-value/ref/mut downcasting (with a soundness fix for downcast_mut in 1.0.103). Implement real downcasting through the owned source, document the receiver semantics (source vs error), and add tests.
AppError::downcastis documented as a stub anddowncast_mutis documented as functional, but both unconditionally fail (introspection.rs):downcastalways returns Err(self),downcast_mutalways returns None. Onlyis/downcast_refwork (and they inspect the source, not the error itself).anyhow provides full by-value/ref/mut downcasting (with a soundness fix for downcast_mut in 1.0.103). Implement real downcasting through the owned source, document the receiver semantics (source vs error), and add tests.