Skip to main content

Module study_io

Module study_io 

Source
Expand description

Reading and writing a Study to disk.

soma-core describes what a study is; putting it on a filesystem is I/O, and a contract crate does not do I/O. Bring StudyIo into scope and the calls read exactly as they did before the split.

use somatize_runtime::study_io::StudyIo;

study.save(dir.join("study.json"))?;
let study = Study::load(dir.join("study.json"))?;

Traits§

StudyIo
Persist a Study as JSON.