pub trait FixedBitLen {
const BIT_LEN: u32;
}Expand description
A message whose encoded length is a compile-time constant — i.e. it has no
variable-length (count-driven Vec) field. The derive implements this only
for fixed messages; it sizes a fixed byte region when the message is embedded
as a field in another message (its contribution to the parent’s width). A
count-bearing message implements BitDecode/BitEncode but not this.
Bits leaves also implement it (their BIT_LEN is Bits::BITS), so a field’s
width is computed uniformly whether it’s a leaf or a nested message.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FixedBitLen for Ipv4Addr
Available on crate feature std only.
impl FixedBitLen for Ipv4Addr
Available on crate feature
std only.Source§impl FixedBitLen for Ipv6Addr
Available on crate feature std only.
impl FixedBitLen for Ipv6Addr
Available on crate feature
std only.