Skip to main content

unsigned_holder

Function unsigned_holder 

Source
pub fn unsigned_holder(bits: u16) -> Type
Expand description

The Java type an unsigned value of bits bits is held in.

The same rule as the primitive table, applied to a width the source gave as a number: up to 16 bits is a number in an int, 17 to 32 a number in a long, and 33 to 64 a pattern in a long. A bitmask of bound 32 therefore takes a long and not an int — an int would hold all 32 bits, but widening it for writeBitmask(long, int) would sign-extend bit 31 into the top half.