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