Trait bdk_chain::bitcoin::amount::serde::SerdeAmount

pub trait SerdeAmount: Sized + Copy {
    // 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.

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>,

Object Safety§

This trait is not object safe.

Implementors§