use std::fmt;
use std::convert::{TryFrom, TryInto};
use std::time::SystemTime;
use std::borrow::Borrow;
use crate::{
KeyHandle,
types::RevocationStatus,
packet::key,
packet::key::SecretKeyMaterial,
types::KeyFlags,
cert::{
Cert,
components::{
Amalgamation,
KeyBundle,
UnfilteredKeyBundleIter,
},
KeyAmalgamation,
ValidKeyAmalgamation,
},
policy::Policy,
};
/// An iterator over all `Key`s (both the primary key and the subkeys)
/// in a certificate.
///
/// Returned by `Cert::keys()`.
///
/// `KeyIter` follows the builder pattern. There is no need to
/// explicitly finalize it, however: it already implements the