pub trait StaticByteLen: SpecByteLen + Consistency<Val = Self::T> {
// Required methods
spec fn static_byte_len() -> nat;
proof fn lemma_static_len_matches_byte_len(&self, v: Self::T);
}Expand description
Static byte length for fixed-size combinators.
Required Methods§
Sourcespec fn static_byte_len() -> nat
spec fn static_byte_len() -> nat
The statically known serialized length.
Sourceproof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
proof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
requires
self.consistent(v),ensuresself.byte_len(v) == Self::static_byte_len(),Bridge between the dynamic byte-length view and the static one.
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.