Primitive Type u16

1.0.0 ·
Expand description

16 位无符号整数类型。

Implementations§

source§

impl u16

1.43.0 · source

pub const MIN: Self = 0u16

此整数类型可以表示的最小值。

Examples

基本用法:

assert_eq!(u16::MIN, 0);
Run
1.43.0 · source

pub const MAX: Self = 65_535u16

该整数类型可以表示的最大值 (216 − 1).

Examples

基本用法:

assert_eq!(u16::MAX, 65535);
Run
1.53.0 · source

pub const BITS: u32 = 16u32

此整数类型的大小 (以位为单位)。

Examples
assert_eq!(u16::BITS, 16);
Run
source

pub fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

将给定基数的字符串切片转换为整数。

该字符串应为可选的 + 符号,后跟数字。

前导和尾随空格表示错误。 根据 radix,数字是这些字符的子集:

  • 0-9
  • a-z
  • A-Z
Panics

如果 radix 不在 2 到 36 之间,则此函数 panics。

Examples

基本用法:

assert_eq!(u16::from_str_radix("A", 16), Ok(10));
Run
const: 1.32.0 · source

pub const fn count_ones(self) -> u32

返回 self 二进制表示形式中的位数。

Examples

基本用法:

let n = 0b01001100u16;

assert_eq!(n.count_ones(), 3);
Run
const: 1.32.0 · source

pub const fn count_zeros(self) -> u32

返回 self 二进制表示形式中的零数。

Examples

基本用法:

assert_eq!(u16::MAX.count_zeros(), 0);
Run
const: 1.32.0 · source

pub const fn leading_zeros(self) -> u32

返回 self 二进制表示形式中前导零的数目。

根据您对值的处理方式,您可能还对 ilog2 函数感兴趣,它返回一致的数字,即使类型变宽。

Examples

基本用法:

let n = u16::MAX >> 2;

assert_eq!(n.leading_zeros(), 2);
Run
const: 1.32.0 · source

pub const fn trailing_zeros(self) -> u32

返回 self 二进制表示形式中的尾随零数。

Examples

基本用法:

let n = 0b0101000u16;

assert_eq!(n.trailing_zeros(), 3);
Run
1.46.0 (const: 1.46.0) · source

pub const fn leading_ones(self) -> u32

返回 self 二进制表示形式中前导数字。

Examples

基本用法:

let n = !(u16::MAX >> 2);

assert_eq!(n.leading_ones(), 2);
Run
1.46.0 (const: 1.46.0) · source

pub const fn trailing_ones(self) -> u32

返回 self 二进制表示形式中的尾随数字。

Examples

基本用法:

let n = 0b1010111u16;

assert_eq!(n.trailing_ones(), 3);
Run
const: 1.32.0 · source

pub const fn rotate_left(self, n: u32) -> Self

将位左移指定的量 n,将截断的位包装到结果整数的末尾。

请注意,此操作与 << 移位运算符不同!

Examples

基本用法:

let n = 0xa003u16;
let m = 0x3a;

assert_eq!(n.rotate_left(4), m);
Run
const: 1.32.0 · source

pub const fn rotate_right(self, n: u32) -> Self

将位右移指定的量 n,将截断的位包装到结果整数的开头。

请注意,此操作与 >> 移位运算符不同!

Examples

基本用法:

let n = 0x3au16;
let m = 0xa003;

assert_eq!(n.rotate_right(4), m);
Run
const: 1.32.0 · source

pub const fn swap_bytes(self) -> Self

反转整数的字节顺序。

Examples

基本用法:

let n = 0x1234u16;
let m = n.swap_bytes();

assert_eq!(m, 0x3412);
Run
1.37.0 (const: 1.37.0) · source

pub const fn reverse_bits(self) -> Self

反转整数中的位顺序。 最低有效位变为最高有效位,第二最低有效位变为第二最高有效位,依此类推。

Examples

基本用法:

let n = 0x1234u16;
let m = n.reverse_bits();

assert_eq!(m, 0x2c48);
assert_eq!(0, 0u16.reverse_bits());
Run
const: 1.32.0 · source

pub const fn from_be(x: Self) -> Self

将整数从大端字节序转换为目标的字节序。

在大端节序序上,这是个禁忌。 在小端字节序上,字节被交换。

Examples

基本用法:

let n = 0x1Au16;

if cfg!(target_endian = "big") {
    assert_eq!(u16::from_be(n), n)
} else {
    assert_eq!(u16::from_be(n), n.swap_bytes())
}
Run
const: 1.32.0 · source

pub const fn from_le(x: Self) -> Self

将整数从小端字节序转换为目标的字节序。

在小端字节序上,这是个禁忌。 在大字节序中,字节被交换。

Examples

基本用法:

let n = 0x1Au16;

if cfg!(target_endian = "little") {
    assert_eq!(u16::from_le(n), n)
} else {
    assert_eq!(u16::from_le(n), n.swap_bytes())
}
Run
const: 1.32.0 · source

pub const fn to_be(self) -> Self

self 从目标的字节序转换为大字节序。

在大端节序序上,这是个禁忌。 在小端字节序上,字节被交换。

Examples

基本用法:

let n = 0x1Au16;

if cfg!(target_endian = "big") {
    assert_eq!(n.to_be(), n)
} else {
    assert_eq!(n.to_be(), n.swap_bytes())
}
Run
const: 1.32.0 · source

pub const fn to_le(self) -> Self

self 从目标的字节序转换为 Little Endian。

在小端字节序上,这是个禁忌。 在大字节序中,字节被交换。

Examples

基本用法:

let n = 0x1Au16;

if cfg!(target_endian = "little") {
    assert_eq!(n.to_le(), n)
} else {
    assert_eq!(n.to_le(), n.swap_bytes())
}
Run
const: 1.47.0 · source

pub const fn checked_add(self, rhs: Self) -> Option<Self>

检查整数加法。 计算 self + rhs,如果发生溢出则返回 None

Examples

基本用法:

assert_eq!((u16::MAX - 2).checked_add(1), Some(u16::MAX - 1));
assert_eq!((u16::MAX - 2).checked_add(3), None);
Run
const: unstable · source

pub unsafe fn unchecked_add(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (unchecked_math #85122)

未经检查的整数加法。 假设不会发生溢出,则计算 self + rhs

Safety

当以下情况时,这导致未定义的行为 self + rhs > u16::MAX or self + rhs < u16::MIN, 即当 checked_add 将返回 None 时。

1.66.0 (const: 1.66.0) · source

pub const fn checked_add_signed(self, rhs: i16) -> Option<Self>

用有符号整数检查加法。 计算 self + rhs,如果发生溢出则返回 None

Examples

基本用法:

assert_eq!(1u16.checked_add_signed(2), Some(3));
assert_eq!(1u16.checked_add_signed(-2), None);
assert_eq!((u16::MAX - 2).checked_add_signed(3), None);
Run
const: 1.47.0 · source

pub const fn checked_sub(self, rhs: Self) -> Option<Self>

检查整数减法。 计算 self - rhs,如果发生溢出则返回 None

Examples

基本用法:

assert_eq!(1u16.checked_sub(1), Some(0));
assert_eq!(0u16.checked_sub(1), None);
Run
const: unstable · source

pub unsafe fn unchecked_sub(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (unchecked_math #85122)

未经检查的整数减法。 假设不会发生溢出,则计算 self - rhs

Safety

当以下情况时,这导致未定义的行为 self - rhs > u16::MAX or self - rhs < u16::MIN, 即当 checked_sub 将返回 None 时。

const: 1.47.0 · source

pub const fn checked_mul(self, rhs: Self) -> Option<Self>

检查整数乘法。 计算 self * rhs,如果发生溢出则返回 None

Examples

基本用法:

assert_eq!(5u16.checked_mul(1), Some(5));
assert_eq!(u16::MAX.checked_mul(2), None);
Run
const: unstable · source

pub unsafe fn unchecked_mul(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (unchecked_math #85122)

未经检查的整数乘法。 假设不会发生溢出,则计算 self * rhs

Safety

当以下情况时,这导致未定义的行为 self * rhs > u16::MAX or self * rhs < u16::MIN, 即当 checked_mul 将返回 None 时。

const: 1.52.0 · source

pub const fn checked_div(self, rhs: Self) -> Option<Self>

检查整数除法。 计算 self / rhs,如果为 rhs == 0,则返回 None

Examples

基本用法:

assert_eq!(128u16.checked_div(2), Some(64));
assert_eq!(1u16.checked_div(0), None);
Run
1.38.0 (const: 1.52.0) · source

pub const fn checked_div_euclid(self, rhs: Self) -> Option<Self>

检查欧几里得除法。 计算 self.div_euclid(rhs),如果为 rhs == 0,则返回 None

Examples

基本用法:

assert_eq!(128u16.checked_div_euclid(2), Some(64));
assert_eq!(1u16.checked_div_euclid(0), None);
Run
1.7.0 (const: 1.52.0) · source

pub const fn checked_rem(self, rhs: Self) -> Option<Self>

检查整数余数。 计算 self % rhs,如果为 rhs == 0,则返回 None

Examples

基本用法:

assert_eq!(5u16.checked_rem(2), Some(1));
assert_eq!(5u16.checked_rem(0), None);
Run
1.38.0 (const: 1.52.0) · source

pub const fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

检查欧几里德模数。 计算 self.rem_euclid(rhs),如果为 rhs == 0,则返回 None

Examples

基本用法:

assert_eq!(5u16.checked_rem_euclid(2), Some(1));
assert_eq!(5u16.checked_rem_euclid(0), None);
Run
1.67.0 (const: 1.67.0) · source

pub const fn ilog(self, base: Self) -> u32

返回数字相对于任意底数的对数,向下取整。

由于实现细节,此方法可能未优化; ilog2 可以更有效地产生以 2 为底的结果,而 ilog10 可以更有效地产生以 10 为底的结果。

Panics

如果 self 为零,或者如果 base 小于 2.

Examples
assert_eq!(5u16.ilog(5), 1);
Run
1.67.0 (const: 1.67.0) · source

pub const fn ilog2(self) -> u32

返回数字的以 2 为底的对数,向下取整。

Panics

如果 self 为零,这个函数将会 panic。

Examples
assert_eq!(2u16.ilog2(), 1);
Run
1.67.0 (const: 1.67.0) · source

pub const fn ilog10(self) -> u32

返回数字的以 10 为底的对数,向下取整。

Panics

如果 self 为零,这个函数将会 panic。

Example
assert_eq!(10u16.ilog10(), 1);
Run
1.67.0 (const: 1.67.0) · source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

返回数字相对于任意底数的对数,向下取整。

如果数字为零,或者基数不至少为零,则返回 None 2.

由于实现细节,此方法可能未优化; checked_ilog2 可以更有效地产生以 2 为底的结果,而 checked_ilog10 可以更有效地产生以 10 为底的结果。

Examples
assert_eq!(5u16.checked_ilog(5), Some(1));
Run
1.67.0 (const: 1.67.0) · source

pub const fn checked_ilog2(self) -> Option<u32>

返回数字的以 2 为底的对数,向下取整。

如果数字为零,则返回 None

Examples
assert_eq!(2u16.checked_ilog2(), Some(1));
Run
1.67.0 (const: 1.67.0) · source

pub const fn checked_ilog10(self) -> Option<u32>

返回数字的以 10 为底的对数,向下取整。

如果数字为零,则返回 None

Examples
assert_eq!(10u16.checked_ilog10(), Some(1));
Run
1.7.0 (const: 1.47.0) · source

pub const fn checked_neg(self) -> Option<Self>

检查否定。 计算 -self,除非 self == 0,否则返回 None

请注意,取反任何正整数将溢出。

Examples

基本用法:

assert_eq!(0u16.checked_neg(), Some(0));
assert_eq!(1u16.checked_neg(), None);
Run
1.7.0 (const: 1.47.0) · source

pub const fn checked_shl(self, rhs: u32) -> Option<Self>

检查左移。 计算 self << rhs,如果 rhs 大于或等于 self 中的位数,则返回 None

Examples

基本用法:

assert_eq!(0x1u16.checked_shl(4), Some(0x10));
assert_eq!(0x10u16.checked_shl(129), None);
Run
const: unstable · source

pub unsafe fn unchecked_shl(self, rhs: u32) -> Self

🔬This is a nightly-only experimental API. (unchecked_math #85122)

未检查的左移。 计算 self << rhs,假设 rhs 小于 self 中的位数。

Safety

如果 rhs 大于或等于 self 中的位数,则会导致未定义的行为,即

checked_shl 返回 None 时。

1.7.0 (const: 1.47.0) · source

pub const fn checked_shr(self, rhs: u32) -> Option<Self>

检查右移。 计算 self >> rhs,如果 rhs 大于或等于 self 中的位数,则返回 None

Examples

基本用法:

assert_eq!(0x10u16.checked_shr(4), Some(0x1));
assert_eq!(0x10u16.checked_shr(129), None);
Run
const: unstable · source

pub unsafe fn unchecked_shr(self, rhs: u32) -> Self

🔬This is a nightly-only experimental API. (unchecked_math #85122)

未检查右移。 计算 self >> rhs,假设 rhs 小于 self 中的位数。

Safety

如果 rhs 大于或等于 self 中的位数,则会导致未定义的行为,即

checked_shr 返回 None 时。

1.34.0 (const: 1.50.0) · source

pub const fn checked_pow(self, exp: u32) -> Option<Self>

检查取幂。 计算 self.pow(exp),如果发生溢出则返回 None

Examples

基本用法:

assert_eq!(2u16.checked_pow(5), Some(32));
assert_eq!(u16::MAX.checked_pow(2), None);
Run
const: 1.47.0 · source

pub const fn saturating_add(self, rhs: Self) -> Self

饱和整数加法。 计算 self + rhs,在数字范围内饱和,而不是溢出。

Examples

基本用法:

assert_eq!(100u16.saturating_add(1), 101);
assert_eq!(u16::MAX.saturating_add(127), u16::MAX);
Run
1.66.0 (const: 1.66.0) · source

pub const fn saturating_add_signed(self, rhs: i16) -> Self

带符号整数的饱和加法。 计算 self + rhs,在数字范围内饱和,而不是溢出。

Examples

基本用法:

assert_eq!(1u16.saturating_add_signed(2), 3);
assert_eq!(1u16.saturating_add_signed(-2), 0);
assert_eq!((u16::MAX - 2).saturating_add_signed(4), u16::MAX);
Run
const: 1.47.0 · source

pub const fn saturating_sub(self, rhs: Self) -> Self

饱和整数减法。 计算 self - rhs,在数字范围内饱和,而不是溢出。

Examples

基本用法:

assert_eq!(100u16.saturating_sub(27), 73);
assert_eq!(13u16.saturating_sub(127), 0);
Run
1.7.0 (const: 1.47.0) · source

pub const fn saturating_mul(self, rhs: Self) -> Self

饱和整数乘法。 计算 self * rhs,在数字范围内饱和,而不是溢出。

Examples

基本用法:

assert_eq!(2u16.saturating_mul(10), 20);
assert_eq!((u16::MAX).saturating_mul(10), u16::MAX);
Run
1.58.0 (const: 1.58.0) · source

pub const fn saturating_div(self, rhs: Self) -> Self

饱和整数除法。 计算 self / rhs,在数值边界处饱和而不是溢出。

Examples

基本用法:

assert_eq!(5u16.saturating_div(2), 2);
Run
let _ = 1u16.saturating_div(0);
Run
1.34.0 (const: 1.50.0) · source

pub const fn saturating_pow(self, exp: u32) -> Self

饱和整数幂。 计算 self.pow(exp),在数字范围内饱和,而不是溢出。

Examples

基本用法:

assert_eq!(4u16.saturating_pow(3), 64);
assert_eq!(u16::MAX.saturating_pow(2), u16::MAX);
Run
const: 1.32.0 · source

pub const fn wrapping_add(self, rhs: Self) -> Self

包装 (modular) 添加。 计算 self + rhs,在类型的边界处回绕。

Examples

基本用法:

assert_eq!(200u16.wrapping_add(55), 255);
assert_eq!(200u16.wrapping_add(u16::MAX), 199);
Run
1.66.0 (const: 1.66.0) · source

pub const fn wrapping_add_signed(self, rhs: i16) -> Self

用有符号整数包装 (modular) 加法。 计算 self + rhs,在类型的边界处回绕。

Examples

基本用法:

assert_eq!(1u16.wrapping_add_signed(2), 3);
assert_eq!(1u16.wrapping_add_signed(-2), u16::MAX);
assert_eq!((u16::MAX - 2).wrapping_add_signed(4), 1);
Run
const: 1.32.0 · source

pub const fn wrapping_sub(self, rhs: Self) -> Self

包装 (modular) 减法。 计算 self - rhs,在类型的边界处回绕。

Examples

基本用法:

assert_eq!(100u16.wrapping_sub(100), 0);
assert_eq!(100u16.wrapping_sub(u16::MAX), 101);
Run
const: 1.32.0 · source

pub const fn wrapping_mul(self, rhs: Self) -> Self

包装 (modular) 乘法。 计算 self * rhs,在类型的边界处回绕。

Examples

基本用法:

请注意,此示例在整数类型之间共享。 这就解释了为什么在这里使用 u8

assert_eq!(10u8.wrapping_mul(12), 120);
assert_eq!(25u8.wrapping_mul(12), 44);
Run
1.2.0 (const: 1.52.0) · source

pub const fn wrapping_div(self, rhs: Self) -> Self

包装 (modular) 分区。计算 self / rhs。 无符号类型的包装除法只是普通除法。 包装是不可能发生的。 该函数存在,因此所有操作都在包装操作中考虑。

Examples

基本用法:

assert_eq!(100u16.wrapping_div(10), 10);
Run
1.38.0 (const: 1.52.0) · source

pub const fn wrapping_div_euclid(self, rhs: Self) -> Self

包装欧几里得除法。计算 self.div_euclid(rhs)。 无符号类型的包装除法只是普通除法。 包装是不可能发生的。 该函数存在,因此所有操作都在包装操作中考虑。 因为对于正整数,所有除法的通用定义都是相等的,所以它恰好等于 self.wrapping_div(rhs)

Examples

基本用法:

assert_eq!(100u16.wrapping_div_euclid(10), 10);
Run
1.2.0 (const: 1.52.0) · source

pub const fn wrapping_rem(self, rhs: Self) -> Self

包装 (modular) 余数。计算 self % rhs。 无符号类型的包装余数计算只是常规余数计算。

包装是不可能发生的。 该函数存在,因此所有操作都在包装操作中考虑。

Examples

基本用法:

assert_eq!(100u16.wrapping_rem(10), 0);
Run
1.38.0 (const: 1.52.0) · source

pub const fn wrapping_rem_euclid(self, rhs: Self) -> Self

包装欧几里德模。计算 self.rem_euclid(rhs)。 无符号类型的包装模运算只是常规的余数计算。 包装是不可能发生的。 该函数存在,因此所有操作都在包装操作中考虑。 因为对于正整数,所有除法的通用定义都是相等的,所以它恰好等于 self.wrapping_rem(rhs)

Examples

基本用法:

assert_eq!(100u16.wrapping_rem_euclid(10), 0);
Run
1.2.0 (const: 1.32.0) · source

pub const fn wrapping_neg(self) -> Self

包装 (modular) 取反。 计算 -self,在类型的边界处回绕。

由于无符号类型没有负的等效项,因此该函数的所有应用程序都将自动换行 (-0 除外)。 对于小于相应有符号类型的最大值的值,结果与强制转换相应有符号值的结果相同。

任何较大的值都等于 MAX + 1 - (val - MAX - 1),其中 MAX 是对应的有符号类型的最大值。

Examples

基本用法:

assert_eq!(0_u16.wrapping_neg(), 0);
assert_eq!(u16::MAX.wrapping_neg(), 1);
assert_eq!(13_u16.wrapping_neg(), (!13) + 1);
assert_eq!(42_u16.wrapping_neg(), !(42 - 1));
Run
1.2.0 (const: 1.32.0) · source

pub const fn wrapping_shl(self, rhs: u32) -> Self

无 Panic - 按位左移; 产生 self << mask(rhs),其中 mask 删除 rhs 的所有高位,这些高位将导致移位超过该类型的位宽。

注意,这与左旋不同; 环绕左移的 RHS 限于该类型的范围,而不是从 LHS 移出的位返回到另一端。 所有原始整数类型都实现了 rotate_left 函数,而您可能想要的是 rotate_left 函数。

Examples

基本用法:

assert_eq!(1u16.wrapping_shl(7), 128);
assert_eq!(1u16.wrapping_shl(128), 1);
Run
1.2.0 (const: 1.32.0) · source

pub const fn wrapping_shr(self, rhs: u32) -> Self

无 Panic - 按位右移; 产生 self >> mask(rhs),其中 mask 删除 rhs 的所有高位,这些高位将导致移位超过该类型的位宽。

注意,这与右旋转不同。换行右移的 RHS 限于类型的范围,而不是从 LHS 移出的位返回到另一端。 所有原始整数类型都实现了 rotate_right 函数,而您可能想要的是 rotate_right 函数。

Examples

基本用法:

assert_eq!(128u16.wrapping_shr(7), 1);
assert_eq!(128u16.wrapping_shr(128), 128);
Run
1.34.0 (const: 1.50.0) · source

pub const fn wrapping_pow(self, exp: u32) -> Self

包装 (modular) 指数。 计算 self.pow(exp),在类型的边界处回绕。

Examples

基本用法:

assert_eq!(3u16.wrapping_pow(5), 243);
assert_eq!(3u8.wrapping_pow(6), 217);
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_add(self, rhs: Self) -> (Self, bool)

计算 self + rhs

返回一个加法元组以及一个布尔值,该布尔值指示是否会发生算术溢出。 如果将发生溢出,则返回包装的值。

Examples

基本用法

assert_eq!(5u16.overflowing_add(2), (7, false));
assert_eq!(u16::MAX.overflowing_add(1), (0, true));
Run
const: unstable · source

pub fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)

🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

计算 self + rhs + carry 并返回一个包含总和和输出进位的元组。

对两个整数操作数和一个进位位执行 “ternary addition”,并返回一个输出整数和一个进位位。 这允许将多个加法链接在一起以创建更广泛的加法,并且对于 bignum 加法很有用。

This can be thought of as a 16-bit “full adder”, in the electronics sense. 如果输入进位为假,则此方法等价于 overflowing_add,输出进位等于溢出标志。 请注意,尽管进位和溢出标志对于无符号整数是相似的,但对于有符号整数它们是不同的。

Examples
#![feature(bigint_helper_methods)]

//    3  MAX    (a = 3 × 2^16 + 2^16 - 1)
// +  5    7    (b = 5 × 2^16 + 7)
// ---------
//    9    6    (sum = 9 × 2^16 + 6)

let (a1, a0): (u16, u16) = (3, u16::MAX);
let (b1, b0): (u16, u16) = (5, 7);
let carry0 = false;

let (sum0, carry1) = a0.carrying_add(b0, carry0);
assert_eq!(carry1, true);
let (sum1, carry2) = a1.carrying_add(b1, carry1);
assert_eq!(carry2, false);

assert_eq!((sum1, sum0), (9, 6));
Run
1.66.0 (const: 1.66.0) · source

pub const fn overflowing_add_signed(self, rhs: i16) -> (Self, bool)

使用带符号的 rhs 计算 self + rhs

返回一个加法元组以及一个布尔值,该布尔值指示是否会发生算术溢出。 如果将发生溢出,则返回包装的值。

Examples

基本用法:

assert_eq!(1u16.overflowing_add_signed(2), (3, false));
assert_eq!(1u16.overflowing_add_signed(-2), (u16::MAX, true));
assert_eq!((u16::MAX - 2).overflowing_add_signed(4), (1, true));
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)

计算 self-rhs

返回一个减法的元组以及一个布尔值,该布尔值指示是否会发生算术溢出。 如果将发生溢出,则返回包装的值。

Examples

基本用法

assert_eq!(5u16.overflowing_sub(2), (3, false));
assert_eq!(0u16.overflowing_sub(1), (u16::MAX, true));
Run
const: unstable · source

pub fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)

🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

计算 self-rhs-borrow 并返回一个包含差值和输出借用的元组。

通过从 self 中减去一个整数操作数和一个借用 - in 位来执行 “ternary subtraction”,并返回一个输出整数和一个借用 - out 位。 这允许将多个减法链接在一起以创建更广泛的减法,并且对于 bignum 减法很有用。

Examples
#![feature(bigint_helper_methods)]

//    9    6    (a = 9 × 2^16 + 6)
// -  5    7    (b = 5 × 2^16 + 7)
// ---------
//    3  MAX    (diff = 3 × 2^16 + 2^16 - 1)

let (a1, a0): (u16, u16) = (9, 6);
let (b1, b0): (u16, u16) = (5, 7);
let borrow0 = false;

let (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);
assert_eq!(borrow1, true);
let (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);
assert_eq!(borrow2, false);

assert_eq!((diff1, diff0), (3, u16::MAX));
Run
1.60.0 (const: 1.60.0) · source

pub const fn abs_diff(self, other: Self) -> Self

计算 selfother 之间的绝对差。

Examples

基本用法:

assert_eq!(100u16.abs_diff(80), 20u16);
assert_eq!(100u16.abs_diff(110), 10u16);
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool)

计算 selfrhs 的乘法。

返回乘法的元组以及一个布尔值,该布尔值指示是否会发生算术溢出。 如果将发生溢出,则返回包装的值。

Examples

基本用法:

请注意,此示例在整数类型之间共享。 这就解释了为什么在这里使用 u32

assert_eq!(5u32.overflowing_mul(2), (10, false));
assert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));
Run
1.7.0 (const: 1.52.0) · source

pub const fn overflowing_div(self, rhs: Self) -> (Self, bool)

self 除以 rhs 时计算除数。

返回除数的元组以及指示是否将发生算术溢出的布尔值。 请注意,对于无符号整数,永远不会发生溢出,因此第二个值始终为 false

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法

assert_eq!(5u16.overflowing_div(2), (2, false));
Run
1.38.0 (const: 1.52.0) · source

pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

计算欧几里得除法 self.div_euclid(rhs) 的商。

返回除数的元组以及指示是否将发生算术溢出的布尔值。 请注意,对于无符号整数,永远不会发生溢出,因此第二个值始终为 false。 因为对于正整数,所有除法的通用定义都是相等的,所以它恰好等于 self.overflowing_div(rhs)

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法

assert_eq!(5u16.overflowing_div_euclid(2), (2, false));
Run
1.7.0 (const: 1.52.0) · source

pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool)

self 除以 rhs 时计算余数。

返回除法运算后的余数元组和一个布尔值,该布尔值指示是否会发生算术溢出。 请注意,对于无符号整数,永远不会发生溢出,因此第二个值始终为 false

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法

assert_eq!(5u16.overflowing_rem(2), (1, false));
Run
1.38.0 (const: 1.52.0) · source

pub const fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

以欧几里得除法计算余数 self.rem_euclid(rhs)

返回除以布尔后的模元,并返回一个布尔值,指示是否会发生算术溢出。 请注意,对于无符号整数,永远不会发生溢出,因此第二个值始终为 false。 由于对于正整数,所有除法的通用定义均相等,因此该运算恰好等于 self.overflowing_rem(rhs)

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法

assert_eq!(5u16.overflowing_rem_euclid(2), (1, false));
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_neg(self) -> (Self, bool)

以一种泛滥的方式否定自我。

使用包装操作返回 !self + 1,以返回表示该无符号值的取反的值。 请注意,对于正的无符号值,总是会发生溢出,但取反 0 不会溢出。

Examples

基本用法

assert_eq!(0u16.overflowing_neg(), (0, false));
assert_eq!(2u16.overflowing_neg(), (-2i32 as u16, true));
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool)

将 self 左移 rhs 位。

返回 self 的移位版本的元组以及一个布尔值,该布尔值指示 shift 值是否大于或等于位数。 如果移位值太大,则将值屏蔽 (N-1),其中 N 是位数,然后使用该值执行移位。

Examples

基本用法

assert_eq!(0x1u16.overflowing_shl(4), (0x10, false));
assert_eq!(0x1u16.overflowing_shl(132), (0x10, true));
Run
1.7.0 (const: 1.32.0) · source

pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool)

将 self 右移 rhs 位。

返回 self 的移位版本的元组以及一个布尔值,该布尔值指示 shift 值是否大于或等于位数。 如果移位值太大,则将值屏蔽 (N-1),其中 N 是位数,然后使用该值执行移位。

Examples

基本用法

assert_eq!(0x10u16.overflowing_shr(4), (0x1, false));
assert_eq!(0x10u16.overflowing_shr(132), (0x1, true));
Run
1.34.0 (const: 1.50.0) · source

pub const fn overflowing_pow(self, exp: u32) -> (Self, bool)

通过平方运算,将自己提升到 exp 的功效。

返回一个指数的元组以及一个 bool,指示是否发生了溢出。

Examples

基本用法:

assert_eq!(3u16.overflowing_pow(5), (243, false));
assert_eq!(3u8.overflowing_pow(6), (217, true));
Run
const: 1.50.0 · source

pub const fn pow(self, exp: u32) -> Self

通过平方运算,将自己提升到 exp 的功效。

Examples

基本用法:

assert_eq!(2u16.pow(5), 32);
Run
1.38.0 (const: 1.52.0) · source

pub const fn div_euclid(self, rhs: Self) -> Self

执行欧几里得除法。

因为对于正整数,所有除法的通用定义都是相等的,所以它恰好等于 self / rhs

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法:

assert_eq!(7u16.div_euclid(4), 1); // or any other integer type
Run
1.38.0 (const: 1.52.0) · source

pub const fn rem_euclid(self, rhs: Self) -> Self

计算 self (mod rhs) 的最小余数。

因为对于正整数,所有除法的通用定义都是相等的,所以它恰好等于 self % rhs

Panics

如果 rhs 是,这个函数会 panic 0.

Examples

基本用法:

assert_eq!(7u16.rem_euclid(4), 3); // or any other integer type
Run
source

pub const fn div_floor(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (int_roundings #88581)

计算 selfrhs 的商,将结果四舍五入到负无穷大。

这与对所有无符号整数执行 self / rhs 相同。

Panics

如果 rhs 为零,这个函数将会 panic。

Examples

基本用法:

#![feature(int_roundings)]
assert_eq!(7_u16.div_floor(4), 1);
Run
source

pub const fn div_ceil(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (int_roundings #88581)

计算 selfrhs 的商,将结果四舍五入到正无穷大。

Panics

如果 rhs 为零,这个函数将会 panic。

溢出行为

溢出时,如果启用溢出检查 (默认在调试模式下),此函数将 panic,如果禁用溢出检查 (默认在,生产模式,下),则返回。

Examples

基本用法:

#![feature(int_roundings)]
assert_eq!(7_u16.div_ceil(4), 2);
Run
source

pub const fn next_multiple_of(self, rhs: Self) -> Self

🔬This is a nightly-only experimental API. (int_roundings #88581)

计算大于或等于 rhs 倍数的 self 的最小值。

Panics

如果 rhs 为零,这个函数将会 panic。

溢出行为

溢出时,如果启用溢出检查 (默认在调试模式下),此函数将 panic,如果禁用溢出检查 (默认在,生产模式,下),则返回。

Examples

基本用法:

#![feature(int_roundings)]
assert_eq!(16_u16.next_multiple_of(8), 16);
assert_eq!(23_u16.next_multiple_of(8), 24);
Run
source

pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>

🔬This is a nightly-only experimental API. (int_roundings #88581)

计算大于或等于 rhs 倍数的 self 的最小值。 如果 rhs 为零,则返回 None,否则操作会导致溢出。

Examples

基本用法:

#![feature(int_roundings)]
assert_eq!(16_u16.checked_next_multiple_of(8), Some(16));
assert_eq!(23_u16.checked_next_multiple_of(8), Some(24));
assert_eq!(1_u16.checked_next_multiple_of(0), None);
assert_eq!(u16::MAX.checked_next_multiple_of(2), None);
Run
const: 1.32.0 · source

pub const fn is_power_of_two(self) -> bool

当且仅当某些 kself == 2^k 时,才返回 true

Examples

基本用法:

assert!(16u16.is_power_of_two());
assert!(!10u16.is_power_of_two());
Run
const: 1.50.0 · source

pub const fn next_power_of_two(self) -> Self

返回大于或等于 self 的 2 的最小幂。

当返回值溢出 (即 uN 类型为 self > (1 << (N-1))) 时,它在调试模式下为 panics,在生产模式下返回值被包装为 0 (方法可以返回 0 的唯一情况)。

Examples

基本用法:

assert_eq!(2u16.next_power_of_two(), 2);
assert_eq!(3u16.next_power_of_two(), 4);
Run
const: 1.50.0 · source

pub const fn checked_next_power_of_two(self) -> Option<Self>

返回大于或等于 n 的 2 的最小幂。 如果下一个 2 的幂大于该类型的最大值,则返回 None,否则将 2 的幂包装在 Some 中。

Examples

基本用法:

assert_eq!(2u16.checked_next_power_of_two(), Some(2));
assert_eq!(3u16.checked_next_power_of_two(), Some(4));
assert_eq!(u16::MAX.checked_next_power_of_two(), None);
Run
const: unstable · source

pub fn wrapping_next_power_of_two(self) -> Self

🔬This is a nightly-only experimental API. (wrapping_next_power_of_two #32463)

返回大于或等于 n 的 2 的最小幂。 如果下一个 2 的幂大于该类型的最大值,则返回值将包装为 0

Examples

基本用法:

#![feature(wrapping_next_power_of_two)]

assert_eq!(2u16.wrapping_next_power_of_two(), 2);
assert_eq!(3u16.wrapping_next_power_of_two(), 4);
assert_eq!(u16::MAX.wrapping_next_power_of_two(), 0);
Run
1.32.0 (const: 1.44.0) · source

pub const fn to_be_bytes(self) -> [u8; 2]

以大端 (网络) 字节顺序将这个整数的内存表示形式作为字节数组返回。

Examples
let bytes = 0x1234u16.to_be_bytes();
assert_eq!(bytes, [0x12, 0x34]);
Run
1.32.0 (const: 1.44.0) · source

pub const fn to_le_bytes(self) -> [u8; 2]

以小端字节顺序将这个整数的内存表示形式返回为字节数组。

Examples
let bytes = 0x1234u16.to_le_bytes();
assert_eq!(bytes, [0x34, 0x12]);
Run
1.32.0 (const: 1.44.0) · source

pub const fn to_ne_bytes(self) -> [u8; 2]

将此整数的内存表示作为本机字节顺序的字节数组返回。

由于使用了目标平台的原生字节序,因此,可移植代码应酌情使用 to_be_bytesto_le_bytes

Examples
let bytes = 0x1234u16.to_ne_bytes();
assert_eq!(
    bytes,
    if cfg!(target_endian = "big") {
        [0x12, 0x34]
    } else {
        [0x34, 0x12]
    }
);
Run
1.32.0 (const: 1.44.0) · source

pub const fn from_be_bytes(bytes: [u8; 2]) -> Self

根据其表示形式 (大字节序中的字节数组) 创建一个本地字节序整数值。

Examples
let value = u16::from_be_bytes([0x12, 0x34]);
assert_eq!(value, 0x1234);
Run

从切片而不是数组开始时,可以使用容易出错的转换 API:

fn read_be_u16(input: &mut &[u8]) -> u16 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<u16>());
    *input = rest;
    u16::from_be_bytes(int_bytes.try_into().unwrap())
}
Run
1.32.0 (const: 1.44.0) · source

pub const fn from_le_bytes(bytes: [u8; 2]) -> Self

从它的表示形式以 little endian 的字节数组创建一个本地 endian 整数值。

Examples
let value = u16::from_le_bytes([0x34, 0x12]);
assert_eq!(value, 0x1234);
Run

从切片而不是数组开始时,可以使用容易出错的转换 API:

fn read_le_u16(input: &mut &[u8]) -> u16 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<u16>());
    *input = rest;
    u16::from_le_bytes(int_bytes.try_into().unwrap())
}
Run
1.32.0 (const: 1.44.0) · source

pub const fn from_ne_bytes(bytes: [u8; 2]) -> Self

从其内存表示形式以原生字节序形式创建一个原生字节序整数值。

由于使用了目标平台的原生字节序,因此可移植代码可能希望酌情使用 from_be_bytesfrom_le_bytes

Examples
let value = u16::from_ne_bytes(if cfg!(target_endian = "big") {
    [0x12, 0x34]
} else {
    [0x34, 0x12]
});
assert_eq!(value, 0x1234);
Run

从切片而不是数组开始时,可以使用容易出错的转换 API:

fn read_ne_u16(input: &mut &[u8]) -> u16 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<u16>());
    *input = rest;
    u16::from_ne_bytes(int_bytes.try_into().unwrap())
}
Run
const: 1.32.0 · source

pub const fn min_value() -> Self

👎Deprecating in a future Rust version: replaced by the MIN associated constant on this type

新代码应优先使用 u16::MIN instead.

返回此整数类型可以表示的最小值。

const: 1.32.0 · source

pub const fn max_value() -> Self

👎Deprecating in a future Rust version: replaced by the MAX associated constant on this type

新代码应优先使用 u16::MAX instead.

返回此整数类型可以表示的最大值。

const: unstable · source

pub fn widening_mul(self, rhs: Self) -> (Self, Self)

🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

计算完整的产品 self * rhs,没有溢出的可能性。

这将返回结果的低位 (wrapping) 位和高位 (overflow) 位作为两个单独的值,按该顺序。

如果您还需要在宽结果中添加进位,那么您需要 Self::carrying_mul

Examples

基本用法:

请注意,此示例在整数类型之间共享。 这就解释了为什么在这里使用 u32

#![feature(bigint_helper_methods)]
assert_eq!(5u32.widening_mul(2), (10, 0));
assert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));
Run
const: unstable · source

pub fn carrying_mul(self, rhs: Self, carry: Self) -> (Self, Self)

🔬This is a nightly-only experimental API. (bigint_helper_methods #85532)

计算 “full multiplication” self * rhs + carry 而不可能溢出。

这将返回结果的低位 (wrapping) 位和高位 (overflow) 位作为两个单独的值,按该顺序。

执行 “long multiplication”,它需要添加额外的量,并且可能返回额外的溢出量。 这允许将多个乘法链接在一起以创建代表更大值的 “大整数”。

如果您不需要 carry,那么您可以使用 Self::widening_mul

Examples

基本用法:

请注意,此示例在整数类型之间共享。 这就解释了为什么在这里使用 u32

#![feature(bigint_helper_methods)]
assert_eq!(5u32.carrying_mul(2, 0), (10, 0));
assert_eq!(5u32.carrying_mul(2, 10), (20, 0));
assert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));
assert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));


assert_eq!(u16::MAX.carrying_mul(u16::MAX, u16::MAX), (0, u16::MAX));
Run

This is the core operation needed for scalar multiplication when implementing it for wider-than-native types.


#![feature(bigint_helper_methods)]
fn scalar_mul_eq(little_endian_digits: &mut Vec<u16>, multiplicand: u16) {
    let mut carry = 0;
    对于 little_endian_digits.iter_mut() { (*d, carry) = d.carrying_mul(multiplicand, carry); } 中的 d 如果进位 != 0 {

        little_endian_digits.push(carry);
    }
}

let mut v = vec![10, 20];
scalar_mul_eq(&mut v, 3);
assert_eq!(v, [30, 60]);

assert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);
let mut v = vec![0x4321, 0x8765];
scalar_mul_eq(&mut v, 0xFEED);
assert_eq!(v, [0xE38D, 0xD159, 0x86D3]);
Run

If carry is zero, this is similar to overflowing_mul, except that it gives the value of the overflow instead of just whether one happened:

#![feature(bigint_helper_methods)]
let r = u8::carrying_mul(7, 13, 0);
assert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));
let r = u8::carrying_mul(13, 42, 0);
assert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));
Run

The value of the first field in the returned tuple matches what you’d get by combining the wrapping_mul and wrapping_add methods:

#![feature(bigint_helper_methods)]
assert_eq!(
    789_u16.carrying_mul(456, 123).0, 789_u16.wrapping_mul(456).wrapping_add(123), );
Run
const: unstable · source

pub fn midpoint(self, rhs: u16) -> u16

🔬This is a nightly-only experimental API. (num_midpoint #110840)

计算 selfrhs 的中点。

midpoint(a, b)(a + b) >> 1,就好像它是在足够大的带符号整数类型中执行的一样。 这意味着结果总是向 negative 无穷大舍入,并且永远不会发生溢出。

Examples
#![feature(num_midpoint)]
assert_eq!(0u16.midpoint(4), 2);
assert_eq!(1u16.midpoint(4), 2);
Run
const: unstable · source

pub fn is_utf16_surrogate(self) -> bool

🔬This is a nightly-only experimental API. (utf16_extra #94919)

检查该值是否是 Unicode 代理代码点,这是 char 的不允许值。

Examples
#![feature(utf16_extra)]

let low_non_surrogate = 0xA000u16;
let low_surrogate = 0xD800u16;
let high_surrogate = 0xDC00u16;
let high_non_surrogate = 0xE000u16;

assert!(!low_non_surrogate.is_utf16_surrogate());
assert!(low_surrogate.is_utf16_surrogate());
assert!(high_surrogate.is_utf16_surrogate());
assert!(!high_non_surrogate.is_utf16_surrogate());
Run

Trait Implementations§

source§

impl Add<&u16> for &u16

§

type Output = <u16 as Add<u16>>::Output

应用 + 运算符后的结果类型。
source§

fn add(self, other: &u16) -> <u16 as Add<u16>>::Output

执行 + 操作。 Read more
source§

impl Add<&u16> for u16

§

type Output = <u16 as Add<u16>>::Output

应用 + 运算符后的结果类型。
source§

fn add(self, other: &u16) -> <u16 as Add<u16>>::Output

执行 + 操作。 Read more
source§

impl<'a> Add<u16> for &'a u16

§

type Output = <u16 as Add<u16>>::Output

应用 + 运算符后的结果类型。
source§

fn add(self, other: u16) -> <u16 as Add<u16>>::Output

执行 + 操作。 Read more
source§

impl Add<u16> for u16

§

type Output = u16

应用 + 运算符后的结果类型。
source§

fn add(self, other: u16) -> u16

执行 + 操作。 Read more
1.22.0 · source§

impl AddAssign<&u16> for Saturating<u16>

source§

fn add_assign(&mut self, other: &u16)

执行 += 操作。 Read more
1.22.0 · source§

impl AddAssign<&u16> for Wrapping<u16>

source§

fn add_assign(&mut self, other: &u16)

执行 += 操作。 Read more
1.22.0 · source§

impl AddAssign<&u16> for u16

source§

fn add_assign(&mut self, other: &u16)

执行 += 操作。 Read more
source§

impl AddAssign<u16> for Saturating<u16>

source§

fn add_assign(&mut self, other: u16)

执行 += 操作。 Read more
1.60.0 · source§

impl AddAssign<u16> for Wrapping<u16>

source§

fn add_assign(&mut self, other: u16)

执行 += 操作。 Read more
1.8.0 · source§

impl AddAssign<u16> for u16

source§

fn add_assign(&mut self, other: u16)

执行 += 操作。 Read more
source§

impl Binary for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl BitAnd<&u16> for &u16

§

type Output = <u16 as BitAnd<u16>>::Output

应用 & 运算符后的结果类型。
source§

fn bitand(self, other: &u16) -> <u16 as BitAnd<u16>>::Output

执行 & 操作。 Read more
source§

impl BitAnd<&u16> for u16

§

type Output = <u16 as BitAnd<u16>>::Output

应用 & 运算符后的结果类型。
source§

fn bitand(self, other: &u16) -> <u16 as BitAnd<u16>>::Output

执行 & 操作。 Read more
source§

impl<'a> BitAnd<u16> for &'a u16

§

type Output = <u16 as BitAnd<u16>>::Output

应用 & 运算符后的结果类型。
source§

fn bitand(self, other: u16) -> <u16 as BitAnd<u16>>::Output

执行 & 操作。 Read more
source§

impl BitAnd<u16> for u16

§

type Output = u16

应用 & 运算符后的结果类型。
source§

fn bitand(self, rhs: u16) -> u16

执行 & 操作。 Read more
1.22.0 · source§

impl BitAndAssign<&u16> for Saturating<u16>

source§

fn bitand_assign(&mut self, other: &u16)

执行 &= 操作。 Read more
1.22.0 · source§

impl BitAndAssign<&u16> for Wrapping<u16>

source§

fn bitand_assign(&mut self, other: &u16)

执行 &= 操作。 Read more
1.22.0 · source§

impl BitAndAssign<&u16> for u16

source§

fn bitand_assign(&mut self, other: &u16)

执行 &= 操作。 Read more
source§

impl BitAndAssign<u16> for Saturating<u16>

source§

fn bitand_assign(&mut self, other: u16)

执行 &= 操作。 Read more
1.60.0 · source§

impl BitAndAssign<u16> for Wrapping<u16>

source§

fn bitand_assign(&mut self, other: u16)

执行 &= 操作。 Read more
1.8.0 · source§

impl BitAndAssign<u16> for u16

source§

fn bitand_assign(&mut self, other: u16)

执行 &= 操作。 Read more
source§

impl BitOr<&u16> for &u16

§

type Output = <u16 as BitOr<u16>>::Output

应用 | 运算符后的结果类型。
source§

fn bitor(self, other: &u16) -> <u16 as BitOr<u16>>::Output

执行 | 操作。 Read more
source§

impl BitOr<&u16> for u16

§

type Output = <u16 as BitOr<u16>>::Output

应用 | 运算符后的结果类型。
source§

fn bitor(self, other: &u16) -> <u16 as BitOr<u16>>::Output

执行 | 操作。 Read more
1.45.0 · source§

impl BitOr<NonZeroU16> for u16

§

type Output = NonZeroU16

应用 | 运算符后的结果类型。
source§

fn bitor(self, rhs: NonZeroU16) -> Self::Output

执行 | 操作。 Read more
source§

impl<'a> BitOr<u16> for &'a u16

§

type Output = <u16 as BitOr<u16>>::Output

应用 | 运算符后的结果类型。
source§

fn bitor(self, other: u16) -> <u16 as BitOr<u16>>::Output

执行 | 操作。 Read more
1.45.0 · source§

impl BitOr<u16> for NonZeroU16

§

type Output = NonZeroU16

应用 | 运算符后的结果类型。
source§

fn bitor(self, rhs: u16) -> Self::Output

执行 | 操作。 Read more
source§

impl BitOr<u16> for u16

§

type Output = u16

应用 | 运算符后的结果类型。
source§

fn bitor(self, rhs: u16) -> u16

执行 | 操作。 Read more
1.22.0 · source§

impl BitOrAssign<&u16> for Saturating<u16>

source§

fn bitor_assign(&mut self, other: &u16)

执行 |= 操作。 Read more
1.22.0 · source§

impl BitOrAssign<&u16> for Wrapping<u16>

source§

fn bitor_assign(&mut self, other: &u16)

执行 |= 操作。 Read more
1.22.0 · source§

impl BitOrAssign<&u16> for u16

source§

fn bitor_assign(&mut self, other: &u16)

执行 |= 操作。 Read more
1.45.0 · source§

impl BitOrAssign<u16> for NonZeroU16

source§

fn bitor_assign(&mut self, rhs: u16)

执行 |= 操作。 Read more
source§

impl BitOrAssign<u16> for Saturating<u16>

source§

fn bitor_assign(&mut self, other: u16)

执行 |= 操作。 Read more
1.60.0 · source§

impl BitOrAssign<u16> for Wrapping<u16>

source§

fn bitor_assign(&mut self, other: u16)

执行 |= 操作。 Read more
1.8.0 · source§

impl BitOrAssign<u16> for u16

source§

fn bitor_assign(&mut self, other: u16)

执行 |= 操作。 Read more
source§

impl BitXor<&u16> for &u16

§

type Output = <u16 as BitXor<u16>>::Output

应用 ^ 运算符后的结果类型。
source§

fn bitxor(self, other: &u16) -> <u16 as BitXor<u16>>::Output

执行 ^ 操作。 Read more
source§

impl BitXor<&u16> for u16

§

type Output = <u16 as BitXor<u16>>::Output

应用 ^ 运算符后的结果类型。
source§

fn bitxor(self, other: &u16) -> <u16 as BitXor<u16>>::Output

执行 ^ 操作。 Read more
source§

impl<'a> BitXor<u16> for &'a u16

§

type Output = <u16 as BitXor<u16>>::Output

应用 ^ 运算符后的结果类型。
source§

fn bitxor(self, other: u16) -> <u16 as BitXor<u16>>::Output

执行 ^ 操作。 Read more
source§

impl BitXor<u16> for u16

§

type Output = u16

应用 ^ 运算符后的结果类型。
source§

fn bitxor(self, other: u16) -> u16

执行 ^ 操作。 Read more
1.22.0 · source§

impl BitXorAssign<&u16> for Saturating<u16>

source§

fn bitxor_assign(&mut self, other: &u16)

执行 ^= 操作。 Read more
1.22.0 · source§

impl BitXorAssign<&u16> for Wrapping<u16>

source§

fn bitxor_assign(&mut self, other: &u16)

执行 ^= 操作。 Read more
1.22.0 · source§

impl BitXorAssign<&u16> for u16

source§

fn bitxor_assign(&mut self, other: &u16)

执行 ^= 操作。 Read more
source§

impl BitXorAssign<u16> for Saturating<u16>

source§

fn bitxor_assign(&mut self, other: u16)

执行 ^= 操作。 Read more
1.60.0 · source§

impl BitXorAssign<u16> for Wrapping<u16>

source§

fn bitxor_assign(&mut self, other: u16)

执行 ^= 操作。 Read more
1.8.0 · source§

impl BitXorAssign<u16> for u16

source§

fn bitxor_assign(&mut self, other: u16)

执行 ^= 操作。 Read more
source§

impl Clone for u16

source§

fn clone(&self) -> Self

返回值的副本。 Read more
source§

fn clone_from(&mut self, source: &Self)

source 执行复制分配。 Read more
source§

impl Debug for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。 Read more
source§

impl Default for u16

source§

fn default() -> u16

Returns the default value of 0

source§

impl Display for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。 Read more
source§

impl Div<&u16> for &u16

§

type Output = <u16 as Div<u16>>::Output

应用 / 运算符后的结果类型。
source§

fn div(self, other: &u16) -> <u16 as Div<u16>>::Output

执行 / 操作。 Read more
source§

impl Div<&u16> for u16

§

type Output = <u16 as Div<u16>>::Output

应用 / 运算符后的结果类型。
source§

fn div(self, other: &u16) -> <u16 as Div<u16>>::Output

执行 / 操作。 Read more
1.51.0 · source§

impl Div<NonZeroU16> for u16

source§

fn div(self, other: NonZeroU16) -> u16

此运算将舍入为零,舍去精确结果的任何小数部分,并且不能为 panic。

§

type Output = u16

应用 / 运算符后的结果类型。
source§

impl<'a> Div<u16> for &'a u16

§

type Output = <u16 as Div<u16>>::Output

应用 / 运算符后的结果类型。
source§

fn div(self, other: u16) -> <u16 as Div<u16>>::Output

执行 / 操作。 Read more
source§

impl Div<u16> for u16

此运算将舍入为零,舍去精确结果的任何小数部分。

Panics

This operation will panic if other == 0.

§

type Output = u16

应用 / 运算符后的结果类型。
source§

fn div(self, other: u16) -> u16

执行 / 操作。 Read more
1.22.0 · source§

impl DivAssign<&u16> for Saturating<u16>

source§

fn div_assign(&mut self, other: &u16)

执行 /= 操作。 Read more
1.22.0 · source§

impl DivAssign<&u16> for Wrapping<u16>

source§

fn div_assign(&mut self, other: &u16)

执行 /= 操作。 Read more
1.22.0 · source§

impl DivAssign<&u16> for u16

source§

fn div_assign(&mut self, other: &u16)

执行 /= 操作。 Read more
source§

impl DivAssign<u16> for Saturating<u16>

source§

fn div_assign(&mut self, other: u16)

执行 /= 操作。 Read more
1.60.0 · source§

impl DivAssign<u16> for Wrapping<u16>

source§

fn div_assign(&mut self, other: u16)

执行 /= 操作。 Read more
1.8.0 · source§

impl DivAssign<u16> for u16

source§

fn div_assign(&mut self, other: u16)

执行 /= 操作。 Read more
1.31.0 · source§

impl From<NonZeroU16> for u16

source§

fn from(nonzero: NonZeroU16) -> Self

Converts a NonZeroU16 into an u16

1.28.0 · source§

impl From<bool> for u16

source§

fn from(small: bool) -> Self

Converts a bool to a u16. The resulting value is 0 for false and 1 for true values.

Examples
assert_eq!(u16::from(true), 1);
assert_eq!(u16::from(false), 0);
Run
1.34.0 · source§

impl From<u16> for AtomicU16

source§

fn from(v: u16) -> Self

Converts an u16 into an AtomicU16.

1.6.0 · source§

impl From<u16> for f32

source§

fn from(small: u16) -> Self

Converts u16 to f32 losslessly.

1.6.0 · source§

impl From<u16> for f64

source§

fn from(small: u16) -> Self

Converts u16 to f64 losslessly.

1.26.0 · source§

impl From<u16> for i128

source§

fn from(small: u16) -> Self

Converts u16 to i128 losslessly.

1.5.0 · source§

impl From<u16> for i32

source§

fn from(small: u16) -> Self

Converts u16 to i32 losslessly.

1.5.0 · source§

impl From<u16> for i64

source§

fn from(small: u16) -> Self

Converts u16 to i64 losslessly.

1.26.0 · source§

impl From<u16> for u128

source§

fn from(small: u16) -> Self

Converts u16 to u128 losslessly.

1.5.0 · source§

impl From<u16> for u32

source§

fn from(small: u16) -> Self

Converts u16 to u32 losslessly.

1.5.0 · source§

impl From<u16> for u64

source§

fn from(small: u16) -> Self

Converts u16 to u64 losslessly.

1.26.0 · source§

impl From<u16> for usize

source§

fn from(small: u16) -> Self

Converts u16 to usize losslessly.

1.5.0 · source§

impl From<u8> for u16

source§

fn from(small: u8) -> Self

Converts u8 to u16 losslessly.

source§

impl FromStr for u16

§

type Err = ParseIntError

可以从解析中返回的相关错误。
source§

fn from_str(src: &str) -> Result<Self, ParseIntError>

解析字符串 s 以返回此类型的值。 Read more
source§

impl Hash for u16

source§

fn hash<H: Hasher>(&self, state: &mut H)

将该值输入给定的 HasherRead more
source§

fn hash_slice<H: Hasher>(data: &[u16], state: &mut H)

将这种类型的切片送入给定的 Hasher 中。 Read more
1.42.0 · source§

impl LowerExp for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl LowerHex for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl Mul<&u16> for &u16

§

type Output = <u16 as Mul<u16>>::Output

应用 * 运算符后的结果类型。
source§

fn mul(self, other: &u16) -> <u16 as Mul<u16>>::Output

执行 * 操作。 Read more
source§

impl Mul<&u16> for u16

§

type Output = <u16 as Mul<u16>>::Output

应用 * 运算符后的结果类型。
source§

fn mul(self, other: &u16) -> <u16 as Mul<u16>>::Output

执行 * 操作。 Read more
source§

impl<'a> Mul<u16> for &'a u16

§

type Output = <u16 as Mul<u16>>::Output

应用 * 运算符后的结果类型。
source§

fn mul(self, other: u16) -> <u16 as Mul<u16>>::Output

执行 * 操作。 Read more
source§

impl Mul<u16> for u16

§

type Output = u16

应用 * 运算符后的结果类型。
source§

fn mul(self, other: u16) -> u16

执行 * 操作。 Read more
1.22.0 · source§

impl MulAssign<&u16> for Saturating<u16>

source§

fn mul_assign(&mut self, other: &u16)

执行 *= 操作。 Read more
1.22.0 · source§

impl MulAssign<&u16> for Wrapping<u16>

source§

fn mul_assign(&mut self, other: &u16)

执行 *= 操作。 Read more
1.22.0 · source§

impl MulAssign<&u16> for u16

source§

fn mul_assign(&mut self, other: &u16)

执行 *= 操作。 Read more
source§

impl MulAssign<u16> for Saturating<u16>

source§

fn mul_assign(&mut self, other: u16)

执行 *= 操作。 Read more
1.60.0 · source§

impl MulAssign<u16> for Wrapping<u16>

source§

fn mul_assign(&mut self, other: u16)

执行 *= 操作。 Read more
1.8.0 · source§

impl MulAssign<u16> for u16

source§

fn mul_assign(&mut self, other: u16)

执行 *= 操作。 Read more
source§

impl Not for &u16

§

type Output = <u16 as Not>::Output

应用 ! 运算符后的结果类型。
source§

fn not(self) -> <u16 as Not>::Output

执行一元 ! 操作。 Read more
source§

impl Not for u16

§

type Output = u16

应用 ! 运算符后的结果类型。
source§

fn not(self) -> u16

执行一元 ! 操作。 Read more
source§

impl Octal for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl Ord for u16

source§

fn cmp(&self, other: &u16) -> Ordering

此方法返回 selfother 之间的 OrderingRead more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

比较并返回两个值中的最大值。 Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

比较并返回两个值中的最小值。 Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd,

将值限制在某个时间间隔内。 Read more
source§

impl PartialEq<u16> for u16

source§

fn eq(&self, other: &u16) -> bool

此方法测试 selfother 值是否相等,并由 == 使用。
source§

fn ne(&self, other: &u16) -> bool

此方法测试 !=。 默认实现几乎总是足够的,并且不应在没有充分理由的情况下被覆盖。
source§

impl PartialOrd<u16> for u16

source§

fn partial_cmp(&self, other: &u16) -> Option<Ordering>

如果存在,则此方法返回 selfother 值之间的顺序。 Read more
source§

fn lt(&self, other: &u16) -> bool

此方法测试的内容少于 (对于 selfother),并且由 < 操作员使用。 Read more
source§

fn le(&self, other: &u16) -> bool

此方法测试小于或等于 (对于 selfother),并且由 <= 运算符使用。 Read more
source§

fn ge(&self, other: &u16) -> bool

此方法测试是否大于或等于 (对于 selfother),并且由 >= 运算符使用。 Read more
source§

fn gt(&self, other: &u16) -> bool

此方法测试大于 (对于 selfother),并且由 > 操作员使用。 Read more
1.12.0 · source§

impl<'a> Product<&'a u16> for u16

source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

该方法采用迭代器并通过乘以项从元素生成 Self
1.12.0 · source§

impl Product<u16> for u16

source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

该方法采用迭代器并通过乘以项从元素生成 Self
source§

impl Rem<&u16> for &u16

§

type Output = <u16 as Rem<u16>>::Output

应用 % 运算符后的结果类型。
source§

fn rem(self, other: &u16) -> <u16 as Rem<u16>>::Output

执行 % 操作。 Read more
source§

impl Rem<&u16> for u16

§

type Output = <u16 as Rem<u16>>::Output

应用 % 运算符后的结果类型。
source§

fn rem(self, other: &u16) -> <u16 as Rem<u16>>::Output

执行 % 操作。 Read more
1.51.0 · source§

impl Rem<NonZeroU16> for u16

source§

fn rem(self, other: NonZeroU16) -> u16

此操作满足 n % d == n - (n / d) * d,但不能为 panic。

§

type Output = u16

应用 % 运算符后的结果类型。
source§

impl<'a> Rem<u16> for &'a u16

§

type Output = <u16 as Rem<u16>>::Output

应用 % 运算符后的结果类型。
source§

fn rem(self, other: u16) -> <u16 as Rem<u16>>::Output

执行 % 操作。 Read more
source§

impl Rem<u16> for u16

此操作满足 n % d == n - (n / d) * d。 结果具有与左操作数相同的符号。

Panics

This operation will panic if other == 0.

§

type Output = u16

应用 % 运算符后的结果类型。
source§

fn rem(self, other: u16) -> u16

执行 % 操作。 Read more
1.22.0 · source§

impl RemAssign<&u16> for Saturating<u16>

source§

fn rem_assign(&mut self, other: &u16)

执行 %= 操作。 Read more
1.22.0 · source§

impl RemAssign<&u16> for Wrapping<u16>

source§

fn rem_assign(&mut self, other: &u16)

执行 %= 操作。 Read more
1.22.0 · source§

impl RemAssign<&u16> for u16

source§

fn rem_assign(&mut self, other: &u16)

执行 %= 操作。 Read more
source§

impl RemAssign<u16> for Saturating<u16>

source§

fn rem_assign(&mut self, other: u16)

执行 %= 操作。 Read more
1.60.0 · source§

impl RemAssign<u16> for Wrapping<u16>

source§

fn rem_assign(&mut self, other: u16)

执行 %= 操作。 Read more
1.8.0 · source§

impl RemAssign<u16> for u16

source§

fn rem_assign(&mut self, other: u16)

执行 %= 操作。 Read more
source§

impl Shl<&i128> for &u16

§

type Output = <u16 as Shl<i128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i128) -> <u16 as Shl<i128>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i128> for u16

§

type Output = <u16 as Shl<i128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i128) -> <u16 as Shl<i128>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i16> for &u16

§

type Output = <u16 as Shl<i16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i16) -> <u16 as Shl<i16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i16> for u16

§

type Output = <u16 as Shl<i16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i16) -> <u16 as Shl<i16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i32> for &u16

§

type Output = <u16 as Shl<i32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i32) -> <u16 as Shl<i32>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i32> for u16

§

type Output = <u16 as Shl<i32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i32) -> <u16 as Shl<i32>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i64> for &u16

§

type Output = <u16 as Shl<i64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i64) -> <u16 as Shl<i64>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i64> for u16

§

type Output = <u16 as Shl<i64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i64) -> <u16 as Shl<i64>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i8> for &u16

§

type Output = <u16 as Shl<i8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i8) -> <u16 as Shl<i8>>::Output

执行 << 操作。 Read more
source§

impl Shl<&i8> for u16

§

type Output = <u16 as Shl<i8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &i8) -> <u16 as Shl<i8>>::Output

执行 << 操作。 Read more
source§

impl Shl<&isize> for &u16

§

type Output = <u16 as Shl<isize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &isize) -> <u16 as Shl<isize>>::Output

执行 << 操作。 Read more
source§

impl Shl<&isize> for u16

§

type Output = <u16 as Shl<isize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &isize) -> <u16 as Shl<isize>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u128> for &u16

§

type Output = <u16 as Shl<u128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u128) -> <u16 as Shl<u128>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u128> for u16

§

type Output = <u16 as Shl<u128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u128) -> <u16 as Shl<u128>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &i128

§

type Output = <i128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &i16

§

type Output = <i16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &i32

§

type Output = <i32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &i64

§

type Output = <i64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &i8

§

type Output = <i8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &isize

§

type Output = <isize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <isize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &u128

§

type Output = <u128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &u16

§

type Output = <u16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &u32

§

type Output = <u32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &u64

§

type Output = <u64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &u8

§

type Output = <u8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for &usize

§

type Output = <usize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <usize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for i128

§

type Output = <i128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for i16

§

type Output = <i16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for i32

§

type Output = <i32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for i64

§

type Output = <i64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for i8

§

type Output = <i8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <i8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for isize

§

type Output = <isize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <isize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for u128

§

type Output = <u128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for u16

§

type Output = <u16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for u32

§

type Output = <u32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for u64

§

type Output = <u64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for u8

§

type Output = <u8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <u8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u16> for usize

§

type Output = <usize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u16) -> <usize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u32> for &u16

§

type Output = <u16 as Shl<u32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u32) -> <u16 as Shl<u32>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u32> for u16

§

type Output = <u16 as Shl<u32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u32) -> <u16 as Shl<u32>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u64> for &u16

§

type Output = <u16 as Shl<u64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u64) -> <u16 as Shl<u64>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u64> for u16

§

type Output = <u16 as Shl<u64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u64) -> <u16 as Shl<u64>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u8> for &u16

§

type Output = <u16 as Shl<u8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u8) -> <u16 as Shl<u8>>::Output

执行 << 操作。 Read more
source§

impl Shl<&u8> for u16

§

type Output = <u16 as Shl<u8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &u8) -> <u16 as Shl<u8>>::Output

执行 << 操作。 Read more
source§

impl Shl<&usize> for &u16

§

type Output = <u16 as Shl<usize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &usize) -> <u16 as Shl<usize>>::Output

执行 << 操作。 Read more
source§

impl Shl<&usize> for u16

§

type Output = <u16 as Shl<usize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: &usize) -> <u16 as Shl<usize>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<i128> for &'a u16

§

type Output = <u16 as Shl<i128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i128) -> <u16 as Shl<i128>>::Output

执行 << 操作。 Read more
source§

impl Shl<i128> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i128) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<i16> for &'a u16

§

type Output = <u16 as Shl<i16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i16) -> <u16 as Shl<i16>>::Output

执行 << 操作。 Read more
source§

impl Shl<i16> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i16) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<i32> for &'a u16

§

type Output = <u16 as Shl<i32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i32) -> <u16 as Shl<i32>>::Output

执行 << 操作。 Read more
source§

impl Shl<i32> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i32) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<i64> for &'a u16

§

type Output = <u16 as Shl<i64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i64) -> <u16 as Shl<i64>>::Output

执行 << 操作。 Read more
source§

impl Shl<i64> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i64) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<i8> for &'a u16

§

type Output = <u16 as Shl<i8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i8) -> <u16 as Shl<i8>>::Output

执行 << 操作。 Read more
source§

impl Shl<i8> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: i8) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<isize> for &'a u16

§

type Output = <u16 as Shl<isize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: isize) -> <u16 as Shl<isize>>::Output

执行 << 操作。 Read more
source§

impl Shl<isize> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: isize) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<u128> for &'a u16

§

type Output = <u16 as Shl<u128>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u128) -> <u16 as Shl<u128>>::Output

执行 << 操作。 Read more
source§

impl Shl<u128> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u128) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a i128

§

type Output = <i128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <i128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a i16

§

type Output = <i16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <i16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a i32

§

type Output = <i32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <i32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a i64

§

type Output = <i64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <i64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a i8

§

type Output = <i8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <i8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a isize

§

type Output = <isize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <isize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a u128

§

type Output = <u128 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <u128 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a u16

§

type Output = <u16 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <u16 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a u32

§

type Output = <u32 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <u32 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a u64

§

type Output = <u64 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <u64 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a u8

§

type Output = <u8 as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <u8 as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl<'a> Shl<u16> for &'a usize

§

type Output = <usize as Shl<u16>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> <usize as Shl<u16>>::Output

执行 << 操作。 Read more
source§

impl Shl<u16> for i128

§

type Output = i128

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> i128

执行 << 操作。 Read more
source§

impl Shl<u16> for i16

§

type Output = i16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> i16

执行 << 操作。 Read more
source§

impl Shl<u16> for i32

§

type Output = i32

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> i32

执行 << 操作。 Read more
source§

impl Shl<u16> for i64

§

type Output = i64

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> i64

执行 << 操作。 Read more
source§

impl Shl<u16> for i8

§

type Output = i8

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> i8

执行 << 操作。 Read more
source§

impl Shl<u16> for isize

§

type Output = isize

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> isize

执行 << 操作。 Read more
source§

impl Shl<u16> for u128

§

type Output = u128

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> u128

执行 << 操作。 Read more
source§

impl Shl<u16> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> u16

执行 << 操作。 Read more
source§

impl Shl<u16> for u32

§

type Output = u32

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> u32

执行 << 操作。 Read more
source§

impl Shl<u16> for u64

§

type Output = u64

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> u64

执行 << 操作。 Read more
source§

impl Shl<u16> for u8

§

type Output = u8

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> u8

执行 << 操作。 Read more
source§

impl Shl<u16> for usize

§

type Output = usize

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u16) -> usize

执行 << 操作。 Read more
source§

impl<'a> Shl<u32> for &'a u16

§

type Output = <u16 as Shl<u32>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u32) -> <u16 as Shl<u32>>::Output

执行 << 操作。 Read more
source§

impl Shl<u32> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u32) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<u64> for &'a u16

§

type Output = <u16 as Shl<u64>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u64) -> <u16 as Shl<u64>>::Output

执行 << 操作。 Read more
source§

impl Shl<u64> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u64) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<u8> for &'a u16

§

type Output = <u16 as Shl<u8>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u8) -> <u16 as Shl<u8>>::Output

执行 << 操作。 Read more
source§

impl Shl<u8> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: u8) -> u16

执行 << 操作。 Read more
source§

impl<'a> Shl<usize> for &'a u16

§

type Output = <u16 as Shl<usize>>::Output

应用 << 运算符后的结果类型。
source§

fn shl(self, other: usize) -> <u16 as Shl<usize>>::Output

执行 << 操作。 Read more
source§

impl Shl<usize> for u16

§

type Output = u16

应用 << 运算符后的结果类型。
source§

fn shl(self, other: usize) -> u16

执行 << 操作。 Read more
1.22.0 · source§

impl ShlAssign<&i128> for u16

source§

fn shl_assign(&mut self, other: &i128)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&i16> for u16

source§

fn shl_assign(&mut self, other: &i16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&i32> for u16

source§

fn shl_assign(&mut self, other: &i32)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&i64> for u16

source§

fn shl_assign(&mut self, other: &i64)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&i8> for u16

source§

fn shl_assign(&mut self, other: &i8)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&isize> for u16

source§

fn shl_assign(&mut self, other: &isize)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u128> for u16

source§

fn shl_assign(&mut self, other: &u128)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for i128

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for i16

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for i32

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for i64

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for i8

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for isize

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for u128

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for u16

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for u32

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for u64

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for u8

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u16> for usize

source§

fn shl_assign(&mut self, other: &u16)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u32> for u16

source§

fn shl_assign(&mut self, other: &u32)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u64> for u16

source§

fn shl_assign(&mut self, other: &u64)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&u8> for u16

source§

fn shl_assign(&mut self, other: &u8)

执行 <<= 操作。 Read more
1.22.0 · source§

impl ShlAssign<&usize> for u16

source§

fn shl_assign(&mut self, other: &usize)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<i128> for u16

source§

fn shl_assign(&mut self, other: i128)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<i16> for u16

source§

fn shl_assign(&mut self, other: i16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<i32> for u16

source§

fn shl_assign(&mut self, other: i32)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<i64> for u16

source§

fn shl_assign(&mut self, other: i64)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<i8> for u16

source§

fn shl_assign(&mut self, other: i8)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<isize> for u16

source§

fn shl_assign(&mut self, other: isize)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u128> for u16

source§

fn shl_assign(&mut self, other: u128)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for i128

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for i16

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for i32

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for i64

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for i8

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for isize

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for u128

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for u16

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for u32

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for u64

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for u8

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u16> for usize

source§

fn shl_assign(&mut self, other: u16)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u32> for u16

source§

fn shl_assign(&mut self, other: u32)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u64> for u16

source§

fn shl_assign(&mut self, other: u64)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<u8> for u16

source§

fn shl_assign(&mut self, other: u8)

执行 <<= 操作。 Read more
1.8.0 · source§

impl ShlAssign<usize> for u16

source§

fn shl_assign(&mut self, other: usize)

执行 <<= 操作。 Read more
source§

impl Shr<&i128> for &u16

§

type Output = <u16 as Shr<i128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i128) -> <u16 as Shr<i128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i128> for u16

§

type Output = <u16 as Shr<i128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i128) -> <u16 as Shr<i128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i16> for &u16

§

type Output = <u16 as Shr<i16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i16) -> <u16 as Shr<i16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i16> for u16

§

type Output = <u16 as Shr<i16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i16) -> <u16 as Shr<i16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i32> for &u16

§

type Output = <u16 as Shr<i32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i32) -> <u16 as Shr<i32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i32> for u16

§

type Output = <u16 as Shr<i32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i32) -> <u16 as Shr<i32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i64> for &u16

§

type Output = <u16 as Shr<i64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i64) -> <u16 as Shr<i64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i64> for u16

§

type Output = <u16 as Shr<i64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i64) -> <u16 as Shr<i64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i8> for &u16

§

type Output = <u16 as Shr<i8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i8) -> <u16 as Shr<i8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&i8> for u16

§

type Output = <u16 as Shr<i8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &i8) -> <u16 as Shr<i8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&isize> for &u16

§

type Output = <u16 as Shr<isize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &isize) -> <u16 as Shr<isize>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&isize> for u16

§

type Output = <u16 as Shr<isize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &isize) -> <u16 as Shr<isize>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u128> for &u16

§

type Output = <u16 as Shr<u128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u128) -> <u16 as Shr<u128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u128> for u16

§

type Output = <u16 as Shr<u128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u128) -> <u16 as Shr<u128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &i128

§

type Output = <i128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &i16

§

type Output = <i16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &i32

§

type Output = <i32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &i64

§

type Output = <i64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &i8

§

type Output = <i8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &isize

§

type Output = <isize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <isize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &u128

§

type Output = <u128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &u16

§

type Output = <u16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &u32

§

type Output = <u32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &u64

§

type Output = <u64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &u8

§

type Output = <u8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for &usize

§

type Output = <usize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <usize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for i128

§

type Output = <i128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for i16

§

type Output = <i16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for i32

§

type Output = <i32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for i64

§

type Output = <i64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for i8

§

type Output = <i8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <i8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for isize

§

type Output = <isize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <isize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for u128

§

type Output = <u128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for u16

§

type Output = <u16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for u32

§

type Output = <u32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for u64

§

type Output = <u64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for u8

§

type Output = <u8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <u8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u16> for usize

§

type Output = <usize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u16) -> <usize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u32> for &u16

§

type Output = <u16 as Shr<u32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u32) -> <u16 as Shr<u32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u32> for u16

§

type Output = <u16 as Shr<u32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u32) -> <u16 as Shr<u32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u64> for &u16

§

type Output = <u16 as Shr<u64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u64) -> <u16 as Shr<u64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u64> for u16

§

type Output = <u16 as Shr<u64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u64) -> <u16 as Shr<u64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u8> for &u16

§

type Output = <u16 as Shr<u8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u8) -> <u16 as Shr<u8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&u8> for u16

§

type Output = <u16 as Shr<u8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &u8) -> <u16 as Shr<u8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&usize> for &u16

§

type Output = <u16 as Shr<usize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &usize) -> <u16 as Shr<usize>>::Output

执行 >> 操作。 Read more
source§

impl Shr<&usize> for u16

§

type Output = <u16 as Shr<usize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: &usize) -> <u16 as Shr<usize>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<i128> for &'a u16

§

type Output = <u16 as Shr<i128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i128) -> <u16 as Shr<i128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<i128> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i128) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<i16> for &'a u16

§

type Output = <u16 as Shr<i16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i16) -> <u16 as Shr<i16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<i16> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i16) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<i32> for &'a u16

§

type Output = <u16 as Shr<i32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i32) -> <u16 as Shr<i32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<i32> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i32) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<i64> for &'a u16

§

type Output = <u16 as Shr<i64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i64) -> <u16 as Shr<i64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<i64> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i64) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<i8> for &'a u16

§

type Output = <u16 as Shr<i8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i8) -> <u16 as Shr<i8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<i8> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: i8) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<isize> for &'a u16

§

type Output = <u16 as Shr<isize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: isize) -> <u16 as Shr<isize>>::Output

执行 >> 操作。 Read more
source§

impl Shr<isize> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: isize) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<u128> for &'a u16

§

type Output = <u16 as Shr<u128>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u128) -> <u16 as Shr<u128>>::Output

执行 >> 操作。 Read more
source§

impl Shr<u128> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u128) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a i128

§

type Output = <i128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <i128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a i16

§

type Output = <i16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <i16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a i32

§

type Output = <i32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <i32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a i64

§

type Output = <i64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <i64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a i8

§

type Output = <i8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <i8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a isize

§

type Output = <isize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <isize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a u128

§

type Output = <u128 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <u128 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a u16

§

type Output = <u16 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <u16 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a u32

§

type Output = <u32 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <u32 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a u64

§

type Output = <u64 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <u64 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a u8

§

type Output = <u8 as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <u8 as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl<'a> Shr<u16> for &'a usize

§

type Output = <usize as Shr<u16>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> <usize as Shr<u16>>::Output

执行 >> 操作。 Read more
source§

impl Shr<u16> for i128

§

type Output = i128

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> i128

执行 >> 操作。 Read more
source§

impl Shr<u16> for i16

§

type Output = i16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> i16

执行 >> 操作。 Read more
source§

impl Shr<u16> for i32

§

type Output = i32

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> i32

执行 >> 操作。 Read more
source§

impl Shr<u16> for i64

§

type Output = i64

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> i64

执行 >> 操作。 Read more
source§

impl Shr<u16> for i8

§

type Output = i8

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> i8

执行 >> 操作。 Read more
source§

impl Shr<u16> for isize

§

type Output = isize

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> isize

执行 >> 操作。 Read more
source§

impl Shr<u16> for u128

§

type Output = u128

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> u128

执行 >> 操作。 Read more
source§

impl Shr<u16> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> u16

执行 >> 操作。 Read more
source§

impl Shr<u16> for u32

§

type Output = u32

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> u32

执行 >> 操作。 Read more
source§

impl Shr<u16> for u64

§

type Output = u64

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> u64

执行 >> 操作。 Read more
source§

impl Shr<u16> for u8

§

type Output = u8

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> u8

执行 >> 操作。 Read more
source§

impl Shr<u16> for usize

§

type Output = usize

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u16) -> usize

执行 >> 操作。 Read more
source§

impl<'a> Shr<u32> for &'a u16

§

type Output = <u16 as Shr<u32>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u32) -> <u16 as Shr<u32>>::Output

执行 >> 操作。 Read more
source§

impl Shr<u32> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u32) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<u64> for &'a u16

§

type Output = <u16 as Shr<u64>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u64) -> <u16 as Shr<u64>>::Output

执行 >> 操作。 Read more
source§

impl Shr<u64> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u64) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<u8> for &'a u16

§

type Output = <u16 as Shr<u8>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u8) -> <u16 as Shr<u8>>::Output

执行 >> 操作。 Read more
source§

impl Shr<u8> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: u8) -> u16

执行 >> 操作。 Read more
source§

impl<'a> Shr<usize> for &'a u16

§

type Output = <u16 as Shr<usize>>::Output

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: usize) -> <u16 as Shr<usize>>::Output

执行 >> 操作。 Read more
source§

impl Shr<usize> for u16

§

type Output = u16

应用 >> 运算符后的结果类型。
source§

fn shr(self, other: usize) -> u16

执行 >> 操作。 Read more
1.22.0 · source§

impl ShrAssign<&i128> for u16

source§

fn shr_assign(&mut self, other: &i128)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&i16> for u16

source§

fn shr_assign(&mut self, other: &i16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&i32> for u16

source§

fn shr_assign(&mut self, other: &i32)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&i64> for u16

source§

fn shr_assign(&mut self, other: &i64)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&i8> for u16

source§

fn shr_assign(&mut self, other: &i8)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&isize> for u16

source§

fn shr_assign(&mut self, other: &isize)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u128> for u16

source§

fn shr_assign(&mut self, other: &u128)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for i128

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for i16

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for i32

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for i64

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for i8

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for isize

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for u128

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for u16

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for u32

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for u64

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for u8

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u16> for usize

source§

fn shr_assign(&mut self, other: &u16)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u32> for u16

source§

fn shr_assign(&mut self, other: &u32)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u64> for u16

source§

fn shr_assign(&mut self, other: &u64)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&u8> for u16

source§

fn shr_assign(&mut self, other: &u8)

执行 >>= 操作。 Read more
1.22.0 · source§

impl ShrAssign<&usize> for u16

source§

fn shr_assign(&mut self, other: &usize)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<i128> for u16

source§

fn shr_assign(&mut self, other: i128)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<i16> for u16

source§

fn shr_assign(&mut self, other: i16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<i32> for u16

source§

fn shr_assign(&mut self, other: i32)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<i64> for u16

source§

fn shr_assign(&mut self, other: i64)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<i8> for u16

source§

fn shr_assign(&mut self, other: i8)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<isize> for u16

source§

fn shr_assign(&mut self, other: isize)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u128> for u16

source§

fn shr_assign(&mut self, other: u128)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for i128

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for i16

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for i32

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for i64

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for i8

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for isize

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for u128

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for u16

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for u32

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for u64

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for u8

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u16> for usize

source§

fn shr_assign(&mut self, other: u16)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u32> for u16

source§

fn shr_assign(&mut self, other: u32)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u64> for u16

source§

fn shr_assign(&mut self, other: u64)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<u8> for u16

source§

fn shr_assign(&mut self, other: u8)

执行 >>= 操作。 Read more
1.8.0 · source§

impl ShrAssign<usize> for u16

source§

fn shr_assign(&mut self, other: usize)

执行 >>= 操作。 Read more
source§

impl SimdElement for u16

§

type Mask = i16

🔬This is a nightly-only experimental API. (portable_simd #86656)
此元素类型对应的掩码元素类型。
source§

impl Step for u16

source§

unsafe fn forward_unchecked(start: Self, n: usize) -> Self

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过将 self countsuccessor 而获得的值。 Read more
source§

unsafe fn backward_unchecked(start: Self, n: usize) -> Self

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过获取 self count 次的 predecessor 而获得的值。 Read more
source§

fn forward(start: Self, n: usize) -> Self

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过将 self countsuccessor 而获得的值。 Read more
source§

fn backward(start: Self, n: usize) -> Self

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过获取 self count 次的 predecessor 而获得的值。 Read more
source§

fn steps_between(start: &Self, end: &Self) -> Option<usize>

🔬This is a nightly-only experimental API. (step_trait #42168)
返回从 startend 所需的 successor 步骤的数量。 Read more
source§

fn forward_checked(start: Self, n: usize) -> Option<Self>

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过将 self countsuccessor 而获得的值。 Read more
source§

fn backward_checked(start: Self, n: usize) -> Option<Self>

🔬This is a nightly-only experimental API. (step_trait #42168)
返回通过获取 self count 次的 predecessor 而获得的值。 Read more
source§

impl Sub<&u16> for &u16

§

type Output = <u16 as Sub<u16>>::Output

应用 - 运算符后的结果类型。
source§

fn sub(self, other: &u16) -> <u16 as Sub<u16>>::Output

执行 - 操作。 Read more
source§

impl Sub<&u16> for u16

§

type Output = <u16 as Sub<u16>>::Output

应用 - 运算符后的结果类型。
source§

fn sub(self, other: &u16) -> <u16 as Sub<u16>>::Output

执行 - 操作。 Read more
source§

impl<'a> Sub<u16> for &'a u16

§

type Output = <u16 as Sub<u16>>::Output

应用 - 运算符后的结果类型。
source§

fn sub(self, other: u16) -> <u16 as Sub<u16>>::Output

执行 - 操作。 Read more
source§

impl Sub<u16> for u16

§

type Output = u16

应用 - 运算符后的结果类型。
source§

fn sub(self, other: u16) -> u16

执行 - 操作。 Read more
1.22.0 · source§

impl SubAssign<&u16> for Saturating<u16>

source§

fn sub_assign(&mut self, other: &u16)

执行 -= 操作。 Read more
1.22.0 · source§

impl SubAssign<&u16> for Wrapping<u16>

source§

fn sub_assign(&mut self, other: &u16)

执行 -= 操作。 Read more
1.22.0 · source§

impl SubAssign<&u16> for u16

source§

fn sub_assign(&mut self, other: &u16)

执行 -= 操作。 Read more
source§

impl SubAssign<u16> for Saturating<u16>

source§

fn sub_assign(&mut self, other: u16)

执行 -= 操作。 Read more
1.60.0 · source§

impl SubAssign<u16> for Wrapping<u16>

source§

fn sub_assign(&mut self, other: u16)

执行 -= 操作。 Read more
1.8.0 · source§

impl SubAssign<u16> for u16

source§

fn sub_assign(&mut self, other: u16)

执行 -= 操作。 Read more
1.12.0 · source§

impl<'a> Sum<&'a u16> for u16

source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

使用迭代器并通过 “summing up” 项从元素生成 Self 的方法。
1.12.0 · source§

impl Sum<u16> for u16

source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

使用迭代器并通过 “summing up” 项从元素生成 Self 的方法。
1.34.0 · source§

impl TryFrom<i128> for u16

source§

fn try_from(u: i128) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<i16> for u16

source§

fn try_from(u: i16) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<i32> for u16

source§

fn try_from(u: i32) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<i64> for u16

source§

fn try_from(u: i64) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<i8> for u16

source§

fn try_from(u: i8) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<isize> for u16

source§

fn try_from(u: isize) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u128> for u16

source§

fn try_from(u: u128) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.46.0 · source§

impl TryFrom<u16> for NonZeroU16

source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Attempts to convert u16 to NonZeroU16.

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u16> for i16

source§

fn try_from(u: u16) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u16> for i8

source§

fn try_from(u: u16) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u16> for isize

source§

fn try_from(value: u16) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u16> for u8

source§

fn try_from(u: u16) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u32> for u16

source§

fn try_from(u: u32) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<u64> for u16

source§

fn try_from(u: u64) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.34.0 · source§

impl TryFrom<usize> for u16

source§

fn try_from(u: usize) -> Result<Self, Self::Error>

尝试从源号码类型创建目标号码类型。 如果源值超出目标类型的范围,则返回错误。

§

type Error = TryFromIntError

发生转换错误时返回的类型。
1.42.0 · source§

impl UpperExp for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl UpperHex for u16

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。
source§

impl ConstParamTy for u16

source§

impl Copy for u16

source§

impl Eq for u16

source§

impl FloatToInt<u16> for f32

source§

impl FloatToInt<u16> for f64

source§

impl SimdCast for u16

source§

impl StructuralEq for u16

source§

impl TrustedStep for u16

Auto Trait Implementations§

§

impl RefUnwindSafe for u16

§

impl Send for u16

§

impl Sync for u16

§

impl Unpin for u16

§

impl UnwindSafe for u16

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

获取 selfTypeIdRead more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

从拥有的值中一成不变地借用。 Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

从拥有的值中借用。 Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

返回未更改的参数。

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

调用 U::from(self)

也就是说,这种转换是 From<T> for U 实现选择执行的任何操作。

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

发生转换错误时返回的类型。
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

发生转换错误时返回的类型。
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。