[][src]Trait jwt::ToBase64

pub trait ToBase64 {
    fn to_base64(&self) -> Result<Cow<str>, Error>;
}

A trait used to convert objects in base64 encoding. The return type can be either owned if the header is dynamic, or it can be borrowed if the header is a static, pre-computed value. It is implemented automatically for every type that implements Serialize. as a base64 encoding of the object's JSON representation.

Required methods

fn to_base64(&self) -> Result<Cow<str>, Error>

Loading content...

Implementors

impl ToBase64 for PrecomputedAlgorithmOnlyHeader[src]

impl<T: Serialize> ToBase64 for T[src]

Loading content...