solana_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,

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 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§