pub trait VarInt: Sized {
    // Required methods
    fn visit_seq<'de, A>(seq: A) -> Result<Self, <A as SeqAccess<'de>>::Error>
       where A: SeqAccess<'de>;
    fn serialize<S>(
        self,
        serializer: S
    ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
       where S: Serializer;
}

Required Methods§

fn visit_seq<'de, A>(seq: A) -> Result<Self, <A as SeqAccess<'de>>::Error>
where A: SeqAccess<'de>,

fn serialize<S>( self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl VarInt for u16

§

fn visit_seq<'de, A>(seq: A) -> Result<u16, <A as SeqAccess<'de>>::Error>
where A: SeqAccess<'de>,

§

fn serialize<S>( self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

§

impl VarInt for u32

§

fn visit_seq<'de, A>(seq: A) -> Result<u32, <A as SeqAccess<'de>>::Error>
where A: SeqAccess<'de>,

§

fn serialize<S>( self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

§

impl VarInt for u64

§

fn visit_seq<'de, A>(seq: A) -> Result<u64, <A as SeqAccess<'de>>::Error>
where A: SeqAccess<'de>,

§

fn serialize<S>( self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Implementors§