pub unsafe trait Length: Copy {
// Required method
fn value(self) -> usize;
}Expand description
A trait allowing a type to yield a value.
This allows the lengths of BitSlices to be either static or dynamic.
§Safety
Implementations must ensure that self.value() always returns the same value for a
given instance and that this value is preserved across all copies obtained from self.
Required Methods§
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.