Trait bonsaidb::client::fabruic::dangerous::PrivateKey
pub trait PrivateKey {
// Required methods
fn as_ref(private_key: &Self) -> &[u8] ⓘ;
fn into(private_key: Self) -> Vec<u8, Global> ⓘ;
fn serialize<S>(
private_key: &Self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer;
}Expand description
Gives read access to the PrivateKey.
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 as_ref(private_key: &Self) -> &[u8] ⓘ
fn as_ref(private_key: &Self) -> &[u8] ⓘ
Returns a &[u8] to the PrivateKey.
Security
This is only dangerous in the sense that you aren’t supposed to leak the
PrivateKey. Make sure to use this carefully!
fn into(private_key: Self) -> Vec<u8, Global> ⓘ
fn into(private_key: Self) -> Vec<u8, Global> ⓘ
Returns a Vec<u8> to the PrivateKey.
Security
This is only dangerous in the sense that you aren’t supposed to leak the
PrivateKey. Make sure to use this carefully!
fn serialize<S>(
private_key: &Self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( private_key: &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.