pub trait ProviderData: Sized {
    // Required methods
    fn parse_blob(blob: Blob) -> Result<Self>;
    fn to_blob(&self) -> Result<Blob>;
}
Expand description

Trait to be implemented by custom data types for convenient parsing and serialization to/from Blobs.

Implementations can be derived using the ProviderData derive macro.

Required Methods§

source

fn parse_blob(blob: Blob) -> Result<Self>

Parses a Blob with the correct MIME type into the struct implementing this trait.

source

fn to_blob(&self) -> Result<Blob>

Serializes an instance of this type and stores the result in a Blob.

Object Safety§

This trait is not object safe.

Implementors§