pub struct RunsIndex {
pub runs: HashMap<String, RunMetadata>,
}Expand description
Index of all runs
Fields§
§runs: HashMap<String, RunMetadata>Implementations§
Source§impl RunsIndex
impl RunsIndex
pub fn load(state_dir: &Path) -> Result<Self>
Sourcepub fn load_or_reset(state_dir: &Path) -> Result<Self>
pub fn load_or_reset(state_dir: &Path) -> Result<Self>
Load index, or reset state if incompatible format detected
pub fn save(&self, state_dir: &Path) -> Result<()>
pub fn add_run(&mut self, run: RunMetadata)
pub fn get_run(&self, run_id: &str) -> Option<&RunMetadata>
pub fn get_run_mut(&mut self, run_id: &str) -> Option<&mut RunMetadata>
pub fn get_sorted_runs(&self) -> Vec<&RunMetadata>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunsIndex
impl<'de> Deserialize<'de> for RunsIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunsIndex
impl RefUnwindSafe for RunsIndex
impl Send for RunsIndex
impl Sync for RunsIndex
impl Unpin for RunsIndex
impl UnwindSafe for RunsIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more