pub fn to_jwt_part<T: Serialize>(input: &T) -> Result<String, Error> {
    let encoded = serde_json::to_string(input)?;
    Ok(base64::encode_config(
        encoded.as_bytes(),
        base64::URL_SAFE_NO_PAD,
    ))
}
/// Serializes to JSON and encodes to base64
Serializes to JSON and encodes to base64
Serializes to JSON and encodes to base64
pub fn to_jwt_part<T: Serialize>(input: &T) -> Result<String, Error> {
    let encoded = serde_json::to_string(input)?;
    Ok(base64::encode_config(
        encoded.as_bytes(),
        base64::URL_SAFE_NO_PAD,
    ))
}
pub fn to_jwt_part < T : Serialize > ( input : & T ) -> Result < String , Error > { let encoded = serde_json :: to_string ( input ) ? ; Ok ( base64 :: encode_config ( encoded . as_bytes ( ) , base64 :: URL_SAFE_NO_PAD , ) ) }
Serializes to JSON and encodes to base64
Serializes to JSON and encodes to base64
input
&T