pub struct BerBitStringFmt<const LIMIT: usize>(pub Tag);Expand description
BER BIT STRING with bounded constructed nesting and a configurable outer tag identity.
Parsing accepts primitive and constructed definite/indefinite forms. Serialization always emits a primitive definite-length BER encoding.
Tuple Fields§
§0: TagImplementations§
Trait Implementations§
Source§impl<T, const LIMIT: usize> ByteLen<T> for BerBitStringFmt<LIMIT>
impl<T, const LIMIT: usize> ByteLen<T> for BerBitStringFmt<LIMIT>
Source§impl<const LIMIT: usize> Clone for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Clone for BerBitStringFmt<LIMIT>
Source§fn clone(&self) -> BerBitStringFmt<LIMIT>
fn clone(&self) -> BerBitStringFmt<LIMIT>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const LIMIT: usize> Consistency for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Consistency for BerBitStringFmt<LIMIT>
Source§open spec fn consistent(&self, value: Self::Val) -> bool
open spec fn consistent(&self, value: Self::Val) -> bool
{ ber_bit_string_normalized_fmt(self.0).consistent(value) }Source§type Val = BitStringSpec
type Val = BitStringSpec
The type of values whose consistency is being checked.
Source§impl<const LIMIT: usize> EquivSerializers for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> EquivSerializers for BerBitStringFmt<LIMIT>
Source§proof fn lemma_serialize_equiv_on_empty(&self, value: BitStringSpec)
proof fn lemma_serialize_equiv_on_empty(&self, value: BitStringSpec)
Source§impl<const LIMIT: usize> EquivSerializersGeneral for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> EquivSerializersGeneral for BerBitStringFmt<LIMIT>
Source§proof fn lemma_serialize_equiv(&self, value: BitStringSpec, obuf: Seq<u8>)
proof fn lemma_serialize_equiv(&self, value: BitStringSpec, obuf: Seq<u8>)
Source§fn equiv_general_inv(&self) -> bool
fn equiv_general_inv(&self) -> bool
Source§impl<const LIMIT: usize> GoodSerializer for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> GoodSerializer for BerBitStringFmt<LIMIT>
Source§proof fn lemma_serialize_len(&self, value: BitStringSpec)
proof fn lemma_serialize_len(&self, value: BitStringSpec)
Source§fn serialize_inv(&self) -> bool
fn serialize_inv(&self) -> bool
Source§impl<const LIMIT: usize> HasAsn1Start for BerBitStringFmt<LIMIT>
Recursive BER BIT STRING accepts primitive and constructed forms of one tag identity.
impl<const LIMIT: usize> HasAsn1Start for BerBitStringFmt<LIMIT>
Recursive BER BIT STRING accepts primitive and constructed forms of one tag identity.
Source§open spec fn asn1_start(&self) -> Asn1StartDomain
open spec fn asn1_start(&self) -> Asn1StartDomain
{ asn1_start_identity_uint(self.0.class, tag_num_to_uint(self.0.number)) }Source§proof fn lemma_parse_implies_asn1_start(&self, input: Seq<u8>)
proof fn lemma_parse_implies_asn1_start(&self, input: Seq<u8>)
Source§impl<const LIMIT: usize> NonTailFmt for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> NonTailFmt for BerBitStringFmt<LIMIT>
Source§proof fn lemma_serialize_dps_prepend(&self, value: BitStringSpec, obuf: Seq<u8>)
proof fn lemma_serialize_dps_prepend(&self, value: BitStringSpec, obuf: Seq<u8>)
Source§proof fn lemma_serialize_dps_len(&self, value: BitStringSpec, obuf: Seq<u8>)
proof fn lemma_serialize_dps_len(&self, value: BitStringSpec, obuf: Seq<u8>)
Source§fn serialize_dps_inv(&self) -> bool
fn serialize_dps_inv(&self) -> bool
Source§impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerBitStringFmt<LIMIT>
Available on crate feature alloc only.
impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerBitStringFmt<LIMIT>
Available on crate feature
alloc only.Source§impl<T, const LIMIT: usize> Prepare<T> for BerBitStringFmt<LIMIT>
impl<T, const LIMIT: usize> Prepare<T> for BerBitStringFmt<LIMIT>
Source§impl<const LIMIT: usize> Productive for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Productive for BerBitStringFmt<LIMIT>
Source§proof fn lemma_productive(&self, ibuf: Seq<u8>)
proof fn lemma_productive(&self, ibuf: Seq<u8>)
Source§fn productive_inv(&self) -> bool
fn productive_inv(&self) -> bool
Source§impl<const LIMIT: usize> Retaggable for BerBitStringFmt<LIMIT>
Supports IMPLICIT tagging of recursive BER BIT STRING values.
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.
Source§impl<const LIMIT: usize> SPRoundTripDps for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SPRoundTripDps for BerBitStringFmt<LIMIT>
Source§proof fn theorem_serialize_dps_parse_roundtrip(
&self,
value: BitStringSpec,
obuf: Seq<u8>,
)
proof fn theorem_serialize_dps_parse_roundtrip( &self, value: BitStringSpec, obuf: Seq<u8>, )
Source§fn unambiguous(&self) -> bool
fn unambiguous(&self) -> bool
Source§impl<const LIMIT: usize> SafeParser for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SafeParser for BerBitStringFmt<LIMIT>
Source§impl<Output, T, const LIMIT: usize> Serializer<Output, T> for BerBitStringFmt<LIMIT>where
Output: OutputBuf,
T: DeepView<V = BitStringSpec> + ?Sized,
ASN1Fmt<BitStringFmt<BER>, BER>: Serializer<Output, T>,
impl<Output, T, const LIMIT: usize> Serializer<Output, T> for BerBitStringFmt<LIMIT>where
Output: OutputBuf,
T: DeepView<V = BitStringSpec> + ?Sized,
ASN1Fmt<BitStringFmt<BER>, BER>: Serializer<Output, T>,
Source§open spec fn exec_inv(&self) -> bool
open spec fn exec_inv(&self) -> bool
{
<ASN1Fmt<
BitStringFmt<BER>,
BER,
> as Serializer<Output, T>>::exec_inv(&ber_bit_string_normalized_fmt(self.0))
}Source§exec fn serialize_into(&self, value: &T, obuf: &mut Output)
exec fn serialize_into(&self, value: &T, obuf: &mut Output)
Source§impl<const LIMIT: usize> SpecByteLen for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SpecByteLen for BerBitStringFmt<LIMIT>
Source§impl<const LIMIT: usize> SpecParser for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SpecParser for BerBitStringFmt<LIMIT>
Source§open spec fn spec_parse(&self, ibuf: Seq<u8>) -> Option<(int, Self::PVal)>
open spec fn spec_parse(&self, ibuf: Seq<u8>) -> Option<(int, Self::PVal)>
{ FixWith::<LIMIT, _, _>(BerBitStringRecBody, self.0).spec_parse(ibuf) }Source§type PVal = BitStringSpec
type PVal = BitStringSpec
The type of parsed values.
Source§impl<const LIMIT: usize> SpecSerializer for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SpecSerializer for BerBitStringFmt<LIMIT>
Source§open spec fn spec_serialize(&self, value: Self::SVal) -> Seq<u8>
open spec fn spec_serialize(&self, value: Self::SVal) -> Seq<u8>
{ ber_bit_string_normalized_fmt(self.0).spec_serialize(value) }Source§type SVal = BitStringSpec
type SVal = BitStringSpec
The type of values to be serialized.
Source§impl<const LIMIT: usize> SpecSerializerDps for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> SpecSerializerDps for BerBitStringFmt<LIMIT>
Source§open spec fn spec_serialize_dps(&self, value: Self::SValue, obuf: Seq<u8>) -> Seq<u8>
open spec fn spec_serialize_dps(&self, value: Self::SValue, obuf: Seq<u8>) -> Seq<u8>
{ ber_bit_string_normalized_fmt(self.0).spec_serialize_dps(value, obuf) }Source§type SValue = BitStringSpec
type SValue = BitStringSpec
The type of values to be serialized.
impl<const LIMIT: usize> Copy for BerBitStringFmt<LIMIT>
Auto Trait Implementations§
impl<const LIMIT: usize> Freeze for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> RefUnwindSafe for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Send for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Sync for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> Unpin for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> UnsafeUnpin for BerBitStringFmt<LIMIT>
impl<const LIMIT: usize> UnwindSafe for BerBitStringFmt<LIMIT>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: From<T>,
impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: From<T>,
fn obeys_from_spec() -> bool
fn from_spec(v: T) -> VERUS_SPEC__A
§impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: Into<T>,
impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: Into<T>,
fn obeys_into_spec() -> bool
fn into_spec(self) -> T
§impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
fn obeys_into_spec() -> bool
fn into_spec(self) -> U
Source§impl<C> NonAmbiguous for Cwhere
C: SPRoundTrip,
impl<C> NonAmbiguous for Cwhere
C: SPRoundTrip,
Source§open spec fn nonamb_inv(&self) -> bool
open spec fn nonamb_inv(&self) -> bool
{ self.sp_roundtrip_inv() }Source§proof fn lemma_serialize_injective(
&self,
v1: <C as Consistency>::Val,
v2: <C as Consistency>::Val,
)
proof fn lemma_serialize_injective( &self, v1: <C as Consistency>::Val, v2: <C as Consistency>::Val, )
Source§impl<C> SPRoundTrip for C
impl<C> SPRoundTrip for C
Source§open spec fn sp_roundtrip_inv(&self) -> bool
open spec fn sp_roundtrip_inv(&self) -> bool
{ self.serialize_inv() && self.equiv_inv() && self.unambiguous() }