[−][src]Struct solana_libra_canonical_serialization::SimpleSerializer
An implementation of a simple canonical serialization format that implements the CanonicalSerializer trait using a byte vector.
Methods
impl<W> SimpleSerializer<W> where
W: Default + Write,
[src]
W: Default + Write,
pub fn new() -> Self
[src]
pub fn serialize(object: &impl CanonicalSerialize) -> Result<W>
[src]
Create a SimpleSerializer on the fly and serialize object
pub fn get_output(self) -> W
[src]
Consume the SimpleSerializer and return the output
Trait Implementations
impl<W> CanonicalSerializer for SimpleSerializer<W> where
W: Write,
[src]
W: Write,
fn encode_u64(&mut self, v: u64) -> Result<&mut Self>
[src]
fn encode_u32(&mut self, v: u32) -> Result<&mut Self>
[src]
fn encode_u16(&mut self, v: u16) -> Result<&mut Self>
[src]
fn encode_u8(&mut self, v: u8) -> Result<&mut Self>
[src]
fn encode_bool(&mut self, b: bool) -> Result<&mut Self>
[src]
fn encode_raw_bytes(&mut self, bytes: &[u8]) -> Result<&mut Self>
[src]
fn encode_variable_length_bytes(&mut self, v: &[u8]) -> Result<&mut Self>
[src]
fn encode_btreemap<K: CanonicalSerialize, V: CanonicalSerialize>(
&mut self,
v: &BTreeMap<K, V>
) -> Result<&mut Self>
[src]
&mut self,
v: &BTreeMap<K, V>
) -> Result<&mut Self>
fn encode_vec<T: CanonicalSerialize>(&mut self, v: &[T]) -> Result<&mut Self>
[src]
fn encode_struct(
&mut self,
structure: &impl CanonicalSerialize
) -> Result<&mut Self> where
Self: Sized,
[src]
&mut self,
structure: &impl CanonicalSerialize
) -> Result<&mut Self> where
Self: Sized,
impl<W: Clone> Clone for SimpleSerializer<W>
[src]
fn clone(&self) -> SimpleSerializer<W>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<W> Default for SimpleSerializer<W> where
W: Default + Write,
[src]
W: Default + Write,
Auto Trait Implementations
impl<W> Sync for SimpleSerializer<W> where
W: Sync,
W: Sync,
impl<W> Send for SimpleSerializer<W> where
W: Send,
W: Send,
impl<W> Unpin for SimpleSerializer<W> where
W: Unpin,
W: Unpin,
impl<W> RefUnwindSafe for SimpleSerializer<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> UnwindSafe for SimpleSerializer<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,