debian/rust-vendor/bitvec/doc/field/resize.md
raw| 1 | # Value Resizing |
| 2 | |
| 3 | This zero-extends or truncates a source value to fit into a target type. |
| 4 | |
| 5 | ## Type Parameters |
| 6 | |
| 7 | - `T`: The initial integer type of the value being resized. |
| 8 | - `U`: The destination type of the value after resizing. |
| 9 | |
| 10 | ## Parameters |
| 11 | |
| 12 | - `value`: Any (unsigned) integer. |
| 13 | |
| 14 | ## Returns |
| 15 | |
| 16 | `value`, either zero-extended in the most-significant bits (if `U` is wider than |
| 17 | `T`) or truncated retaining the least-significant bits (if `U` is narrower than |
| 18 | `T`). |