Trait mesh::payload::encoding::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.

Object Safety§

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§