use std::path::Path;
use crate::types::PresentationMetadata;
pub trait SidecarFormat {
fn read(&self, path: &Path) -> Result<PresentationMetadata, SidecarError>;
fn write(&self, path: &Path, metadata: &PresentationMetadata) -> Result<(), SidecarError>;
fn file_extension(&self) -> &'static str;
}
#[derive(Debug, thiserror::Error)]
pub enum SidecarError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Parse error at line {line}: {message}")]
Parse { line: usize, message: String },
#[error("Missing required section: {0}")]
MissingSection(String),
}