mesh::payload::encoding

Trait ToNumber

Source
pub trait ToNumber: Copy {
    // Required methods
    fn to_u64(self) -> u64;
    fn to_i64(self) -> i64;
}
Expand description

A trait for converting a value to a u64 for use in varint encodings.

Required Methods§

Source

fn to_u64(self) -> u64

Convert to a u64.

Source

fn to_i64(self) -> i64

Convert to an i64.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToNumber for bool

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for char

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for i8

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for i16

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for i32

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for i64

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for isize

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for u8

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for u16

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for u32

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for u64

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for usize

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<i8>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<i16>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<i32>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<i64>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<isize>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<u8>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<u16>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<u32>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<u64>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl ToNumber for NonZero<usize>

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl<T> ToNumber for &T
where T: ToNumber,

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Source§

impl<T> ToNumber for Wrapping<T>
where T: ToNumber,

Source§

fn to_u64(self) -> u64

Source§

fn to_i64(self) -> i64

Implementors§