pub trait SerdeAmountForOpt: Copy + Sized + SerdeAmount + Sealed {
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§
sourcefn type_prefix() -> &'static str
fn type_prefix() -> &'static str
Return the type prefix (i
or u
) used to sign or not the amount.
sourcefn ser_pico_opt<S: Serializer>(self, s: S) -> Result<S::Ok, S::Error>
fn ser_pico_opt<S: Serializer>(self, s: S) -> Result<S::Ok, S::Error>
Serialize with Serializer
an optional amount as piconero.
sourcefn ser_xmr_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>
Serialize with Serializer
an optional amount as monero.