Trait monero::util::amount::serde::SerdeAmountForSlice

source ·
pub trait SerdeAmountForSlice: Copy + Sized + SerdeAmount + Sealed {
    // Required methods
    fn type_prefix() -> &'static str;
    fn ser_pico_slice<S: SerializeSeq>(&self, s: &mut S) -> Result<(), S::Error>;
    fn ser_xmr_slice<S: SerializeSeq>(&self, s: &mut S) -> Result<(), S::Error>;
}
Available on crate feature serde only.
Expand description

This trait is for serialization of &[Amount] and &[SignedAmount] slices

Required Methods§

source

fn type_prefix() -> &'static str

Return the type prefix (i or u) used to sign or not the amount.

source

fn ser_pico_slice<S: SerializeSeq>(&self, s: &mut S) -> Result<(), S::Error>

Serialize with Serializer a slice of amounts as a slice of piconeros.

source

fn ser_xmr_slice<S: SerializeSeq>(&self, s: &mut S) -> Result<(), S::Error>

Serialize with Serializer a slice of amounts as a slice of moneros.

Object Safety§

This trait is not object safe.

Implementors§