ConfigFormat

Trait ConfigFormat 

Source
pub trait ConfigFormat {
    // Required methods
    fn extension(&self) -> &OsStr;
    fn de<T>(&self, slice: &[u8]) -> Result<T, Box<dyn Error + Send + Sync>>
       where T: DeserializeOwned;
    fn ser<T>(&self, t: &T) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>
       where T: Serialize;
}

Required Methods§

Source

fn extension(&self) -> &OsStr

Source

fn de<T>(&self, slice: &[u8]) -> Result<T, Box<dyn Error + Send + Sync>>

Source

fn ser<T>(&self, t: &T) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>
where T: Serialize,

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.

Implementors§