pub trait ZerocopyWord: ZerocopyWord + Copy {
// Required method
fn read_as_usize(self) -> Option<usize>;
}Expand description
Borrowed offset or value word usable by offset-integrity primitives.
Sealed: native unsigned integers and little-endian storage words opt in via the in-tree macros below. External crates cannot satisfy this trait.
§Performance
Reading a word is expected to be O(1).
Required Methods§
Sourcefn read_as_usize(self) -> Option<usize>
fn read_as_usize(self) -> Option<usize>
Reads this word’s value as usize, or returns None when the value
does not fit in usize on the current target.
§Performance
This method is O(1).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".