pub trait KeyPair {
    // Required method
    fn serialize<S: Serializer>(
        key_pair: &Self,
        serializer: S
    ) -> Result<S::Ok, S::Error>;
}
Available on crate feature dangerous only.
Expand description

Gives serialization access to KeyPair.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

Required Methods§

source

fn serialize<S: Serializer>( key_pair: &Self, serializer: S ) -> Result<S::Ok, S::Error>

Serialize with serde.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

Errors

S::Error if serialization failed.

Implementors§