Trait llm_chain::serialization::IoExt
source · 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.