Trait mesh_protobuf::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 NonZeroI8

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroI16

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroI32

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroI64

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroIsize

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroU8

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroU16

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroU32

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroU64

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl ToNumber for NonZeroUsize

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

impl<T: ToNumber> ToNumber for &T

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

source§

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

source§

fn to_u64(self) -> u64

source§

fn to_i64(self) -> i64

Implementors§