Base64Serializable

Trait Base64Serializable 

Source
pub trait Base64Serializable {
    // Provided methods
    fn to_base64(&self) -> Result<String>
       where Self: Serialize { ... }
    fn from_base64(data: &str) -> Result<Self>
       where Self: Sized + for<'de> Deserialize<'de> { ... }
}
Expand description

Trait for serializing and deserializing from base64 encoded data

Provided Methods§

Source

fn to_base64(&self) -> Result<String>
where Self: Serialize,

Serialize to base64 encoded string

Source

fn from_base64(data: &str) -> Result<Self>
where Self: Sized + for<'de> Deserialize<'de>,

Deserialize from base64 encoded string

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§