Function streambed_storage::save_struct

source ยท
pub async fn save_struct<T, U, F, S, SE>(
    state_storage_path: &Path,
    ss: &impl SecretStore,
    secret_path: &str,
    serialize: S,
    rng: F,
    state: &T,
) -> Result<(), Box<dyn Error>>
where T: Serialize, S: FnOnce(&T) -> Result<Vec<u8>, SE>, F: FnOnce() -> U, U: RngCore,
Expand description

Saves an encrypted structure described by T. Any IO errors are returned.