pub trait KeyPair {
// Required method
fn serialize<S>(
key_pair: &Self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer;
}
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§
fn serialize<S>(
key_pair: &Self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( key_pair: &Self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
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.