solana_program::serde_varint

Trait VarInt

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

Required Methods§

source

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

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VarInt for u16

source§

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

source§

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

source§

impl VarInt for u32

source§

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

source§

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

source§

impl VarInt for u64

source§

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

source§

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

Implementors§