//! Tagged trait for types with ASN.1 tags
use crateTag;
/// Trait for types that have a statically known, outermost ASN.1 tag.
///
/// The tag returned by [`tag()`] is the **first byte** (the tag octet) that
/// [`Decode::decode`] expects to see in the input stream, and the tag that
/// [`Encode::encode`] writes at the start of the encoded form.
///
/// This is used by [`ImplicitTag`] to reconstruct the implicit tag's original
/// tag before forwarding to the inner type's `Decode` implementation.
/// It is therefore critical that `tag()` and `Decode::decode` agree on the
/// expected tag value.
///
/// [`Decode::decode`]: crate::Decode::decode
/// [`Encode::encode`]: crate::Encode::encode
/// [`ImplicitTag`]: crate::ImplicitTag
/// [`tag()`]: Self::tag