pub trait ProtobufVarint {
    // Required method
    fn len_varint(&self) -> u32;
}
Expand description

Helper trait implemented by integer types which could be encoded as varint.

Required Methods§

source

fn len_varint(&self) -> u32

Size of self when encoded as varint.

Implementations on Foreign Types§

source§

impl ProtobufVarint for u32

source§

fn len_varint(&self) -> u32

source§

impl ProtobufVarint for i32

source§

fn len_varint(&self) -> u32

source§

impl ProtobufVarint for u64

source§

fn len_varint(&self) -> u32

source§

impl ProtobufVarint for bool

source§

fn len_varint(&self) -> u32

source§

impl ProtobufVarint for i64

source§

fn len_varint(&self) -> u32

Implementors§