Trait Dynamic

Source
pub trait Dynamic: Sized {
    // Required methods
    fn from_bytes(bytes: Vec<u8>) -> Result<Self>;
    fn into_bytes(&self) -> Result<&[u8]>;
}

Required Methods§

Source

fn from_bytes(bytes: Vec<u8>) -> Result<Self>

Source

fn into_bytes(&self) -> Result<&[u8]>

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.

Implementations on Foreign Types§

Source§

impl Dynamic for String

Source§

fn from_bytes(bytes: Vec<u8>) -> Result<Self>

Source§

fn into_bytes(&self) -> Result<&[u8]>

Source§

impl Dynamic for Vec<u8>

Source§

fn from_bytes(bytes: Vec<u8>) -> Result<Self>

Source§

fn into_bytes(&self) -> Result<&[u8]>

Implementors§