Key4::with_secret and Key6::with_secret can make unsupported keys
sequoia_openpgp::packet::key::Key6::with_secret can be used to construct DSA and Ed25519Legacy Keys, which are unsupported for v6 signatures.
sequoia_openpgp::packet::key::Key4::with_secret can be used to construct Ed25519 (non-legacy) Keys, which are unsupported for v4 signatures.
Since Key4::with_secret and Key6::with_secret return Results, it would make sense for them to fail on issues like this.