Skip to main content

PersistedStateCodec

Trait PersistedStateCodec 

Source
pub trait PersistedStateCodec<T>: 'static {
    // Required methods
    fn encode(&self, value: T) -> String;
    fn decode(&self, payload: &str, version: u32) -> T;
}

Required Methods§

Source

fn encode(&self, value: T) -> String

Source

fn decode(&self, payload: &str, version: u32) -> T

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§