Varint

Trait Varint 

Source
pub trait Varint:
    Default
    + Debug
    + Clone
    + Copy {
    // Required methods
    fn from_u64(v: u64) -> Self;
    fn into_u64(self) -> u64;
}

Required Methods§

Source

fn from_u64(v: u64) -> Self

Source

fn into_u64(self) -> u64

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 Varint for i32

Source§

fn from_u64(v: u64) -> Self

Source§

fn into_u64(self) -> u64

Source§

impl Varint for i64

Source§

fn from_u64(v: u64) -> Self

Source§

fn into_u64(self) -> u64

Source§

impl Varint for u32

Source§

fn from_u64(v: u64) -> Self

Source§

fn into_u64(self) -> u64

Source§

impl Varint for u64

Source§

fn from_u64(v: u64) -> Self

Source§

fn into_u64(self) -> u64

Source§

impl Varint for usize

Source§

fn from_u64(v: u64) -> Self

Source§

fn into_u64(self) -> u64

Implementors§