pub trait JoinHalves: HasHalf {
    fn join_halves(upper: Self::Half, lower: Self::Half) -> Self;
}
Expand description

Provides a function to join two pieces into a number. For example, two u32s may be joined to form a u64.

Required Methods

Joins two values into a single value; the upper, or most-significant, half comes first.

Implementations on Foreign Types

Joins two unsigned integers to form an unsigned integer with twice the width.

Let $W$ be the width of Self (the output type).

$f(x, y) = 2^{W/2} x + y$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Joins two unsigned integers to form an unsigned integer with twice the width.

Let $W$ be the width of Self (the output type).

$f(x, y) = 2^{W/2} x + y$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Joins two unsigned integers to form an unsigned integer with twice the width.

Let $W$ be the width of Self (the output type).

$f(x, y) = 2^{W/2} x + y$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Joins two unsigned integers to form an unsigned integer with twice the width.

Let $W$ be the width of Self (the output type).

$f(x, y) = 2^{W/2} x + y$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Implementors