pub trait IoExt: StorableEntity + Serialize + DeserializeOwned {
    // Provided methods
    fn to_envelope(self) -> Envelope<Self>
       where Self: Sized { ... }
    fn from_envelope(envelope: Envelope<Self>) -> Self { ... }
    fn read_file_sync(path: &str) -> Result<Self, EnvelopeError> { ... }
    fn write_file_sync(self, path: &str) -> Result<(), EnvelopeError> { ... }
}
Expand description

Extension methods for entities that can be stored in an envelope. Makes it easy to read them from the file system.

Provided Methods§

source

fn to_envelope(self) -> Envelope<Self>where Self: Sized,

source

fn from_envelope(envelope: Envelope<Self>) -> Self

source

fn read_file_sync(path: &str) -> Result<Self, EnvelopeError>

source

fn write_file_sync(self, path: &str) -> Result<(), EnvelopeError>

Implementors§