Trait SerdeAmountForOpt

Source
pub trait SerdeAmountForOpt:
    Copy
    + Sized
    + SerdeAmount {
    // Required methods
    fn type_prefix(: Token) -> &'static str;
    fn ser_sat_opt<S: Serializer>(
        self,
        s: S,
        _: Token,
    ) -> Result<S::Ok, S::Error>;
    fn ser_btc_opt<S: Serializer>(
        self,
        s: S,
        _: Token,
    ) -> 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(: Token) -> &'static str

Source

fn ser_sat_opt<S: Serializer>(self, s: S, _: Token) -> Result<S::Ok, S::Error>

Source

fn ser_btc_opt<S: Serializer>(self, s: S, _: Token) -> Result<S::Ok, S::Error>

Available on crate feature alloc only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§