1 2 3 4 5 6 7 8 9
use crate::{Error, Template}; use bincode::deserialize; use std::fs::read; pub fn load_template(path: &str) -> Result<Template, Error> { let bytes = read(path)?; let template: Template = deserialize(&bytes)?; Ok(template) }