pub fn serialize<S>(value: &Hash, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    let base64_bytes = base64::encode(value.as_bytes());
    let base64_string = String::from_utf8(base64_bytes).map_err(serde::ser::Error::custom)?;
    serializer.serialize_str(&base64_string)
}
/// Serialize from a Hash into a base64-encoded string
Serialize from a Hash into a base64-encoded string
Serialize from a Hash into a base64 - encoded string
pub fn serialize<S>(value: &Hash, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    let base64_bytes = base64::encode(value.as_bytes());
    let base64_string = String::from_utf8(base64_bytes).map_err(serde::ser::Error::custom)?;
    serializer.serialize_str(&base64_string)
}
pub fn serialize < S > ( value : & Hash , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer , { let base64_bytes = base64 :: encode ( value . as_bytes ( ) ) ; let base64_string = String :: from_utf8 ( base64_bytes ) . map_err ( serde :: ser :: Error :: custom ) ? ; serializer . serialize_str ( & base64_string ) }
Serialize from a Hash into a base64-encoded string
Serialize from a Hash into a base64 - encoded string
value
&Hash
serializer
S