[][src]Trait solana_libra_canonical_serialization::CanonicalSerializer

pub trait CanonicalSerializer {
    fn encode_u64(&mut self, v: u64) -> Result<&mut Self>;
fn encode_u32(&mut self, v: u32) -> Result<&mut Self>;
fn encode_u16(&mut self, v: u16) -> Result<&mut Self>;
fn encode_u8(&mut self, v: u8) -> Result<&mut Self>;
fn encode_bool(&mut self, b: bool) -> Result<&mut Self>;
fn encode_raw_bytes(&mut self, bytes: &[u8]) -> Result<&mut Self>;
fn encode_variable_length_bytes(&mut self, v: &[u8]) -> Result<&mut Self>;
fn encode_btreemap<K: CanonicalSerialize, V: CanonicalSerialize>(
        &mut self,
        v: &BTreeMap<K, V>
    ) -> Result<&mut Self>;
fn encode_vec<T: CanonicalSerialize>(
        &mut self,
        v: &[T]
    ) -> Result<&mut Self>; fn encode_struct(
        &mut self,
        structure: &impl CanonicalSerialize
    ) -> Result<&mut Self>
    where
        Self: Sized
, { ... } }

Required methods

fn encode_u64(&mut self, v: u64) -> Result<&mut Self>

fn encode_u32(&mut self, v: u32) -> Result<&mut Self>

fn encode_u16(&mut self, v: u16) -> Result<&mut Self>

fn encode_u8(&mut self, v: u8) -> Result<&mut Self>

fn encode_bool(&mut self, b: bool) -> Result<&mut Self>

fn encode_raw_bytes(&mut self, bytes: &[u8]) -> Result<&mut Self>

fn encode_variable_length_bytes(&mut self, v: &[u8]) -> Result<&mut Self>

fn encode_btreemap<K: CanonicalSerialize, V: CanonicalSerialize>(
    &mut self,
    v: &BTreeMap<K, V>
) -> Result<&mut Self>

fn encode_vec<T: CanonicalSerialize>(&mut self, v: &[T]) -> Result<&mut Self>

Loading content...

Provided methods

fn encode_struct(
    &mut self,
    structure: &impl CanonicalSerialize
) -> Result<&mut Self> where
    Self: Sized

Loading content...

Implementors

impl<W> CanonicalSerializer for SimpleSerializer<W> where
    W: Write
[src]

Loading content...