Trait bitcoin::amount::serde::SerdeAmount
source · pub trait SerdeAmount: Copy + Sized {
// Required methods
fn ser_sat<S>(
self,
s: S,
_: Token
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer;
fn des_sat<'d, D>(
d: D,
_: Token
) -> Result<Self, <D as Deserializer<'d>>::Error>
where D: Deserializer<'d>;
fn ser_btc<S>(
self,
s: S,
_: Token
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer;
fn des_btc<'d, D>(
d: D,
_: Token
) -> Result<Self, <D as Deserializer<'d>>::Error>
where D: Deserializer<'d>;
}
Expand description
This trait is used only to avoid code duplication and naming collisions of the different serde serialization crates.