//! Optional initialization-vector parameter abstraction.
use crateIvParams;
/// Parameters that may provide an initialization vector.
///
/// Key wrappers with a standard IV accept this trait: `None` selects the
/// standard value and `Some` a custom one, which the wrapper validates. Every
/// [`IvParams`] type implements it and returns `Some`; the `KeyWithIvOpt*`
/// containers carry an `Option`, and a key-only type of your own can return
/// `None`.
///
/// # Example
///
/// ```
/// use tc_key_wrap::{IvOptParams, KeyWithIvOptRef, KeyWithIvRef};
///
/// let key = [0x42; 16];
/// assert_eq!(KeyWithIvOptRef::new(&key, None).iv_opt(), None);
/// assert_eq!(KeyWithIvRef::new(&key, &[0xa6; 8]).iv_opt(), Some([0xa6; 8].as_slice()));
/// ```