Struct lrs::num::W64

Syntax

struct W64(u64)

Fields

PositionDescription
1

Static methods

NameDescription
bits

Returns the bit-width of this type.

bytes

Returns the byte-width of this type.

max

Returns the maximum value of this type.

min

Returns the minimum value of this type.

Methods

ReceiverNameDescription
selfchecked_add

Adds another integer to this one and returns the value if no overflow occurred.

selfchecked_mul

Multiplies this integer by another one and returns the value if no overflow occurred.

selfchecked_next_power_of_two

Calculates the next power of two greater or equal the current value.

selfchecked_sub

Subtracts another integer from this one and returns the value if no overflow occurred.

selfcount_ones

Counts the set bits in this integer.

selfcount_zeros

Counts the unset bits in this integer.

selfdiv_rem

Divides this integer by another one and returns both the quotient and the remainder.

selffrom_be

Interprets this integer as a value in big-endian representation and returns the value in host-endian representation.

selffrom_le

Interprets this integer as a value in little-endian representation and returns the value in host-endian representation.

selfleading_ones

Returns the length of longest sequence of set bits starting at the most significant bit.

selfleading_zeros

Returns the length of longest sequence of unset bits starting at the most significant bit.

selfnext_power_of_two

Calculates the next power of two greater or equal the current value.

selfrotate_left

Rotates the value to the right.

selfrotate_right

Rotates the value to the right.

selfsaturating_add

Adds another integer to this one without overflow, trimming the value to the range that can be represented in this type.

selfsaturating_sub

Subtracts another integer to this one without overflow, trimming the value to the range that can be represented in this type.

selfswap

Swaps the bytes in this integer.

selfto_be

Interprets this integer as a value in host-endian representation and returns the value in big-endian representation.

selfto_le

Interprets this integer as a value in host-endian representation and returns the value in little-endian representation.

selftrailing_ones

Returns the length of longest sequence of set bits starting at the least significant bit.

selftrailing_zeros

Returns the length of longest sequence of unset bits starting at the least significant bit.

Trait implementations

NameDescription
Add (2 times)

Objects that implement the binary + operator.

BitAnd (2 times)

Objects that implement the binary & operator.

BitOr (2 times)

Objects that implement the binary | operator.

Copy

Objects that can safely be copied via memcpy.

Deref

Objects that implement the immutable dereference operator.

DerefMut

Objects that implement the mutable dereference operator.

Div (2 times)

Objects that implement the binary / operator.

Eq (2 times)

Objects that implement the binary == and != operators.

Hash

Objects that can be hashed.

Mul (2 times)

Objects that implement the binary * operator.

Ord

Objects that are part of a total order.

PartialOrd

Objects that implement the binary <, <=, >, and >= operators.

Pod

Objects that are safe to use if they contain a random bit pattern.

Rem (2 times)

Objects that implement the binary % operator.

Shl (9 times)

Objects that implement the binary << operator.

Shr (9 times)

Objects that implement the binary >> operator.

Sub (2 times)

Objects that implement the binary - operator.