Skip to main content

LiteralizeCodec

Trait LiteralizeCodec 

Source
pub trait LiteralizeCodec:
    Debug
    + Send
    + Sync {
    // Required methods
    fn try_encode(&self, value: &dyn Literalize) -> Result<Vec<u8>>;
    fn try_decode(&self, value: &[u8]) -> Result<Arc<dyn Literalize>>;
}

Required Methods§

Source

fn try_encode(&self, value: &dyn Literalize) -> Result<Vec<u8>>

Source

fn try_decode(&self, value: &[u8]) -> Result<Arc<dyn Literalize>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§