Trait monero::util::amount::serde::SerdeAmountForOpt

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

This trait is only for internal Amount type serialization/deserialization.

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_opt<S: Serializer>(self, s: S) -> Result<S::Ok, S::Error>

Serialize with Serializer an optional amount as piconero.

source

fn ser_xmr_opt<S: Serializer>(self, s: S) -> Result<S::Ok, S::Error>

Serialize with Serializer an optional amount as monero.

Object Safety§

This trait is not object safe.

Implementors§