urma_runtime/storage.rs
1use crate::error::Error;
2use std::path::Path;
3
4pub fn read_bounded(path: &Path, limit: usize) -> Result<Vec<u8>, Error> {
5 urma_io::read_bounded(path, limit).map_err(Error::from)
6}
7
8pub fn write_new(path: &Path, bytes: &[u8]) -> Result<(), Error> {
9 urma_io::write_new(path, bytes).map_err(Error::from)
10}