cellular_raza_core/backend/chili/
result.rs1use super::{CellIdentifier, SimulationError, SubDomainPlainIndex};
2use crate::storage::StorageManager;
3
4pub struct StorageAccess<C, S> {
6 pub cells: StorageManager<CellIdentifier, C>,
8 pub subdomains: StorageManager<SubDomainPlainIndex, S>,
10}
11
12impl<C, V> StorageAccess<C, V> {
13 pub fn get_path(&self) -> Result<std::path::PathBuf, SimulationError> {
15 match self.cells.extract_builder().get_full_path().parent() {
16 Some(p) => Ok(p.to_path_buf()),
17 None => Err(SimulationError::IoError(std::io::Error::from(
18 std::io::ErrorKind::NotFound,
19 ))),
20 }
21 }
22}