pub trait Retaggable: Copy {
// Required methods
spec fn spec_retagged(&self, tag: Tag) -> Self;
exec fn retagged(&self, tag: Tag) -> retagged : Self;
}Expand description
Formats whose outer ASN.1 tag can be replaced without changing their semantic value.
The replacement’s class and number are authoritative; each format determines the primitive/constructed bit required by its own wire representation.
Required Methods§
Sourcespec fn spec_retagged(&self, tag: Tag) -> Self
spec fn spec_retagged(&self, tag: Tag) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<C: Copy> Retaggable for BerSequenceFmt<C>
Supports IMPLICIT tagging of a BER SEQUENCE or EXPLICIT wrapper without losing its
definite/indefinite-length framing.
Retagging replaces the tag class and number, forces the required constructed form, and preserves the schema-defined content format.
impl<C: Copy> Retaggable for BerSequenceOfFmt<C>
Supports IMPLICIT tagging of a BER SEQUENCE OF/SET OF while retaining its specialized
definite/indefinite-length handling.
Retagging replaces the tag class and number, forces the required constructed form, and preserves the element format.
impl<C: Copy, const DER: bool> Retaggable for ASN1Fmt<C, DER>
Supports IMPLICIT tagging of an ordinary ASN.1 TLV.
Retagging replaces the tag class and number, preserves the base format’s primitive/constructed form, and leaves its content format unchanged.
impl<C: Copy, const LIMIT: usize> Retaggable for BerCharStringFmt<C, LIMIT>
Supports IMPLICIT tagging of a BER restricted character string layered over OCTET STRING.
The outer tag is normalized to the primitive form with the replacement class and number, while OCTET STRING fragment tags, the character-content format, and the recursion limit are preserved.
impl<F> Retaggable for Ref<F>where
F: Retaggable,
Allows references to retaggable formats to pass transparently through IMPLICIT tagging.
Retagging is delegated to the referenced format and the result remains wrapped in Ref.
impl<F, M> Retaggable for Mapped<F, M>where
F: Retaggable,
M: Copy,
Allows a semantic mapping to remain attached when its underlying ASN.1 format is retagged.
Retagging is delegated to the inner format and the mapper is preserved.
impl<F, P> Retaggable for Refined<F, P>where
F: Retaggable,
P: Copy,
Allows a value constraint to remain attached when its underlying ASN.1 format is retagged.
Retagging is delegated to the inner format and the refinement predicate is preserved.
impl<F: Retaggable> Retaggable for ImplicitlyTaggedFmt<F>
Allows IMPLICIT tagging to compose/chain through an existing IMPLICIT-tag wrapper.
The newer tag replaces the stored outer tag and the underlying format is retained; when used,
the underlying Retaggable implementation selects the correct primitive/constructed form.
impl<const LIMIT: usize> Retaggable for BerBitStringFmt<LIMIT>
Supports IMPLICIT tagging of recursive BER BIT STRING values.
The outer identity is replaced and normalized to primitive form; parsing still accepts both primitive and constructed forms, while nested fragments retain universal tag 3.
impl<const LIMIT: usize> Retaggable for BerOctetStringFmt<LIMIT>
Supports IMPLICIT tagging of recursive BER OCTET STRING values.
The stored tag is normalized to the primitive form with the replacement class and number; this
is fine since the parser permits both primitive and constructed forms.
Recursive fragments keep universal tag 4 (see BerOctetStringFmt).