chore: refactor into a RecordingDataManager, lay the ground work for a RenderManager

This commit is contained in:
2026-05-27 01:28:47 -04:00
parent f86c094dda
commit e72633f26a
22 changed files with 830 additions and 49 deletions

View File

@@ -0,0 +1,21 @@
use snafu::{OptionExt as _, ResultExt as _, Snafu};
use std::num::ParseIntError;
pub type Microsecond = u32;
#[derive(Debug, Snafu)]
pub enum TakeError {
/// microseconds are supposed to be followed by -
Malformed,
/// could not parse the microsecond as an integer
ParseIntegerError { source: ParseIntError },
}
pub fn take(path: &str) -> Result<(Microsecond, &str), TakeError> {
let (microsecond, rest) = path.split_once('-').context(MalformedSnafu)?;
let microsecond = microsecond.parse().context(ParseIntegerSnafu)?;
Ok((microsecond, rest))
}