Trait KeySerializer

Source
pub trait KeySerializer {
    // Required methods
    fn create_key(&self) -> KeyVec;
    fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>
       where Self: Sized;
}

Required Methods§

Source

fn create_key(&self) -> KeyVec

Source

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl KeySerializer for i8

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for i16

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for i32

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for i64

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for i128

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for u8

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for u16

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for u32

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for u64

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for u128

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for usize

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for String

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for Vec<u8>

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Source§

impl KeySerializer for ByteBuf

Source§

fn create_key(&self) -> KeyVec

Source§

fn parse_key(key: &[u8]) -> Result<Self, Box<dyn Error + Send + Sync>>

Implementors§