Expand description
Parsing an unsigned integer from a byte slice of arbitrary length.
The input &[u8] need not match the target’s byte width: shorter input
zero-extends, equal is exact, wider is rejected rather than truncated. That
reject case is why the parse returns a Result — an over-long slice has no
lossless reading.
Unsigned-only: zero-extension is unambiguous for magnitudes but has no sign-extension analogue, so signed targets are deliberately excluded.
CT tier A (structure-only) for a fixed-length input: control flow
branches only on bytes.len() (emptiness, over-width), never on byte
values, so a constant-length caller is constant-time.
Structs§
- Byte
Slice Error - Error parsing an integer from a byte slice.
Enums§
- Byte
Slice Error Kind - The reason a
FromByteSliceparse failed.
Traits§
- From
Byte Slice - Parses an unsigned integer from a byte slice of arbitrary length.