pub struct Fixed<const N: usize>;Expand description
Parses/serializes exactly N bytes as Seq<u8>.
Trait Implementations§
Source§impl<const N: usize> Consistency for Fixed<N>
impl<const N: usize> Consistency for Fixed<N>
Source§impl<const N: usize> EquivSerializers for Fixed<N>
impl<const N: usize> EquivSerializers for Fixed<N>
Source§impl<const N: usize> EquivSerializersGeneral for Fixed<N>
impl<const N: usize> EquivSerializersGeneral for Fixed<N>
Source§proof fn lemma_serialize_equiv(&self, v: Self::SVal, obuf: Seq<u8>)
proof fn lemma_serialize_equiv(&self, v: Self::SVal, obuf: Seq<u8>)
Source§fn equiv_general_inv(&self) -> bool
fn equiv_general_inv(&self) -> bool
Source§impl<const N: usize> GoodSerializer for Fixed<N>
impl<const N: usize> GoodSerializer for Fixed<N>
Source§proof fn lemma_serialize_len(&self, v: Self::SVal)
proof fn lemma_serialize_len(&self, v: Self::SVal)
Source§fn serialize_inv(&self) -> bool
fn serialize_inv(&self) -> bool
Source§impl<const N: usize> LeafNonMalleable for Fixed<N>
impl<const N: usize> LeafNonMalleable for Fixed<N>
Source§proof fn nonmal_leaf_inv(&self)
proof fn nonmal_leaf_inv(&self)
Source§impl<const N: usize> MinMaxByteLen for Fixed<N>
impl<const N: usize> MinMaxByteLen for Fixed<N>
Source§impl<const N: usize> NoLookAhead for Fixed<N>
impl<const N: usize> NoLookAhead for Fixed<N>
Source§impl<const N: usize> NonMalleable for Fixed<N>
impl<const N: usize> NonMalleable for Fixed<N>
Source§proof fn lemma_parse_non_malleable(&self, buf1: Seq<u8>, buf2: Seq<u8>)
proof fn lemma_parse_non_malleable(&self, buf1: Seq<u8>, buf2: Seq<u8>)
Source§fn nonmal_inv(&self) -> bool
fn nonmal_inv(&self) -> bool
Source§impl<const N: usize> NonTailFmt for Fixed<N>
impl<const N: usize> NonTailFmt for Fixed<N>
Source§proof fn lemma_serialize_dps_prepend(&self, v: Seq<u8>, obuf: Seq<u8>)
proof fn lemma_serialize_dps_prepend(&self, v: Seq<u8>, obuf: Seq<u8>)
Source§proof fn lemma_serialize_dps_len(&self, v: Seq<u8>, obuf: Seq<u8>)
proof fn lemma_serialize_dps_len(&self, v: Seq<u8>, obuf: Seq<u8>)
Source§fn serialize_dps_inv(&self) -> bool
fn serialize_dps_inv(&self) -> bool
Source§impl<const N: usize> Productive for Fixed<N>
impl<const N: usize> Productive for Fixed<N>
Source§open spec fn productive_inv(&self) -> bool
open spec fn productive_inv(&self) -> bool
{ N > 0 }Source§proof fn lemma_productive(&self, s: Seq<u8>)
proof fn lemma_productive(&self, s: Seq<u8>)
Source§impl<const N: usize> SPRoundTripDps for Fixed<N>
impl<const N: usize> SPRoundTripDps for Fixed<N>
Source§proof fn theorem_serialize_dps_parse_roundtrip(&self, v: Self::T, obuf: Seq<u8>)
proof fn theorem_serialize_dps_parse_roundtrip(&self, v: Self::T, obuf: Seq<u8>)
Source§fn unambiguous(&self) -> bool
fn unambiguous(&self) -> bool
Source§impl<const N: usize> SafeParser for Fixed<N>
impl<const N: usize> SafeParser for Fixed<N>
Source§impl<'i, Output: OutputBuf, const N: usize> Serializer<Output, &'i [u8]> for Fixed<N>
impl<'i, Output: OutputBuf, const N: usize> Serializer<Output, &'i [u8]> for Fixed<N>
Source§exec fn serialize_into(&self, v: &&'i [u8], obuf: &mut Output)
exec fn serialize_into(&self, v: &&'i [u8], obuf: &mut Output)
Source§impl<Output: OutputBuf, const N: usize> Serializer<Output, [u8]> for Fixed<N>
impl<Output: OutputBuf, const N: usize> Serializer<Output, [u8]> for Fixed<N>
Source§exec fn serialize_into(&self, v: &[u8], obuf: &mut Output)
exec fn serialize_into(&self, v: &[u8], obuf: &mut Output)
Source§impl<const N: usize> SoundParser for Fixed<N>
impl<const N: usize> SoundParser for Fixed<N>
Source§impl<const N: usize> SpecByteLen for Fixed<N>
impl<const N: usize> SpecByteLen for Fixed<N>
Source§impl<const N: usize> SpecParser for Fixed<N>
impl<const N: usize> SpecParser for Fixed<N>
Source§impl<const N: usize> SpecSerializer for Fixed<N>
impl<const N: usize> SpecSerializer for Fixed<N>
Source§impl<const N: usize> SpecSerializerDps for Fixed<N>
impl<const N: usize> SpecSerializerDps for Fixed<N>
Source§impl<const N: usize> StaticByteLen for Fixed<N>
impl<const N: usize> StaticByteLen for Fixed<N>
Source§open spec fn static_byte_len() -> nat
open spec fn static_byte_len() -> nat
{ N as nat }Source§proof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
proof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
Source§impl<const N: usize> ValueByteLen for Fixed<N>
impl<const N: usize> ValueByteLen for Fixed<N>
Source§open spec fn value_byte_len(_v: Self::T) -> nat
open spec fn value_byte_len(_v: Self::T) -> nat
{ N as nat }Source§proof fn lemma_value_len_matches_byte_len(&self, v: Self::T)
proof fn lemma_value_len_matches_byte_len(&self, v: Self::T)
impl<const N: usize> Copy for Fixed<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Fixed<N>
impl<const N: usize> RefUnwindSafe for Fixed<N>
impl<const N: usize> Send for Fixed<N>
impl<const N: usize> Sync for Fixed<N>
impl<const N: usize> Unpin for Fixed<N>
impl<const N: usize> UnsafeUnpin for Fixed<N>
impl<const N: usize> UnwindSafe for Fixed<N>
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> PSRoundTrip for C
impl<C> PSRoundTrip for C
Source§open spec fn ps_roundtrip_inv(&self) -> bool
open spec fn ps_roundtrip_inv(&self) -> bool
{ self.safe_inv() && self.sound_inv() && self.nonmal_inv() && self.sp_roundtrip_inv() }Source§proof fn theorem_parse_serialize_roundtrip(&self, ibuf: Seq<u8>)
proof fn theorem_parse_serialize_roundtrip(&self, ibuf: Seq<u8>)
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() }